php-doc-en/reference/outcontrol/reference.xml
Damien Seguy f577f1f18b use of php.ini entity
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@115773 c90b9560-bf6c-de11-be94-00142212c4b1
2003-02-11 11:28:16 +00:00

116 lines
2.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<reference id="ref.outcontrol">
<title>Output Control Functions</title>
<titleabbrev>Output Control</titleabbrev>
<partintro>
<section id="outcontrol.intro">
&reftitle.intro;
<para>
The Output Control functions allow you to control when output is
sent from the script. This can be useful in several different
situations, especially if you need to send headers to the browser
after your script has began outputting data. The Output Control
functions do not affect headers sent using
<function>header</function> or <function>setcookie</function>,
only functions such as <function>echo</function> and data between
blocks of PHP code.
</para>
</section>
<section id="outcontrol.requirements">
&reftitle.required;
&no.requirement;
</section>
<section id="outcontrol.installation">
&reftitle.install;
&no.install;
</section>
&reference.outcontrol.ini;
<section id="outcontrol.resources">
&reftitle.resources;
&no.resource;
</section>
<section id="outcontrol.constants">
&reftitle.constants;
&no.constants;
</section>
<section id="outcontrol.examples">
&reftitle.examples;
<para>
<example>
<title>Output Control example</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
echo "Hello\n";
setcookie ("cookiename", "cookiedata");
ob_end_flush();
?>
]]>
</programlisting>
</example>
</para>
<para>
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>
<note>
<para>
When upgrading from PHP 4.1 (and 4.2) to 4.3 that due to a bug in
earlier versions you must ensure that
<literal>implict_flush</literal> is <literal>OFF</literal> in
your &php.ini;, otherwise any output with
<function>ob_start</function> will be not be hidden from output.
</para>
</note>
</section>
<section id="outcontrol.seealso">
&reftitle.seealso;
<para>
See also <function>header</function> and
<function>setcookie</function>.
</para>
</section>
</partintro>
&reference.outcontrol.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->