mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Examples now work with register_globals = off, and added <?php ?>.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@126938 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a47dfd4c60
commit
612464dc75
1 changed files with 12 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- splitted from ./en/functions/mail.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mail">
|
||||
<refnamediv>
|
||||
|
@ -63,7 +63,9 @@
|
|||
<title>Sending mail.</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -86,10 +88,12 @@ mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");
|
|||
<title>Sending mail with extra headers.</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
mail("nobody@example.com", "the subject", $message,
|
||||
"From: webmaster@$SERVER_NAME\r\n"
|
||||
."Reply-To: webmaster@$SERVER_NAME\r\n"
|
||||
"From: webmaster@{$_SERVER['SERVER_NAME']}\r\n"
|
||||
."Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n"
|
||||
."X-Mailer: PHP/" . phpversion());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -108,8 +112,10 @@ mail("nobody@example.com", "the subject", $message,
|
|||
<title>Sending mail with extra headers and setting an additional command line parameter.</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
mail("nobody@example.com", "the subject", $message,
|
||||
"From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVER_NAME");
|
||||
"From: webmaster@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -129,6 +135,7 @@ mail("nobody@example.com", "the subject", $message,
|
|||
<title>Sending complex email.</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* recipients */
|
||||
$to = "Mary <mary@example.com>" . ", " ; // note the comma
|
||||
$to .= "Kelly <kelly@example.com>";
|
||||
|
@ -171,6 +178,7 @@ $headers .= "Bcc: birthdaycheck@example.com\r\n";
|
|||
|
||||
/* and now mail it */
|
||||
mail($to, $subject, $message, $headers);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue