Date: 08/25/00
- Next message: Jesus Castagnetto: "[PHP-DOC] Spanish translation not yet at snaps.php.net"
- Previous message: Jesus M. Castagnetto: "[PHP-DOC] cvs: phpdoc /en/functions misc.xml"
- Next in thread: Daniel Beckham: "[PHP-DOC] cvs: phpdoc /en/functions outcontrol.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
danbeck Fri Aug 25 14:54:51 2000 EDT
Modified files:
/phpdoc/en/functions outcontrol.xml
Log:
added example to partinfo
Index: phpdoc/en/functions/outcontrol.xml
diff -u phpdoc/en/functions/outcontrol.xml:1.2 phpdoc/en/functions/outcontrol.xml:1.3
--- phpdoc/en/functions/outcontrol.xml:1.2 Fri Aug 25 10:50:16 2000
+++ phpdoc/en/functions/outcontrol.xml Fri Aug 25 14:54:51 2000
@@ -9,18 +9,38 @@
situations, especially if you need to send headers to the browser
after your script has began outputing data. The Output Control
functions do not affect headers sent using
- <function>header</function>, only functions such as
- <function>echo</function> and data between blocks of PHP code.
+ <function>header</function> or <function>setcookie</function>,
+ only functions such as <function>echo</function> and data between
+ blocks of PHP code.
</para>
<para>
<example>
<title><function>Output Control</function> example</title>
<programlisting role="php">
+<?php
+
+ob_start();
+echo "Hello\n";
+
+setcookie("cookiename", "cookiedata");
+
+ob_end_flush();
+
+?>
</programlisting>
</example>
</para>
<para>
- See also <function>header</function>.
+ In the above example, the output from <function>echo</function>
+ would be stored in the output buffer until
+ <function>ob_end_flush</function> was called. In the mean time,
+ the call to <function>setcookie</function> successfully stored a
+ cookie without causing an error. (You can not normally send
+ headers to the browser after data has already been sent.)
+ </para>
+ <para>
+ See also <function>header</function> and
+ <function>setcookie</function>.
</para>
</partintro>
- Next message: Jesus Castagnetto: "[PHP-DOC] Spanish translation not yet at snaps.php.net"
- Previous message: Jesus M. Castagnetto: "[PHP-DOC] cvs: phpdoc /en/functions misc.xml"
- Next in thread: Daniel Beckham: "[PHP-DOC] cvs: phpdoc /en/functions outcontrol.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

