<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Runtime Configuration</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="outcontrol.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="outcontrol.resources.html">Resource Types</a></div> <div class="up"><a href="outcontrol.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="outcontrol.configuration" class="section"> <h2 class="title">Runtime Configuration</h2> <p class="simpara"> The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>. </p> <p class="para"> <table class="doctable table"> <caption><strong>Output Control configuration options</strong></caption> <thead> <tr> <th>Name</th> <th>Default</th> <th>Changeable</th> <th>Changelog</th> </tr> </thead> <tbody class="tbody"> <tr> <td><a href="outcontrol.configuration.html#ini.output-buffering" class="link">output_buffering</a></td> <td>"0"</td> <td>PHP_INI_PERDIR</td> <td class="empty"> </td> </tr> <tr> <td><a href="outcontrol.configuration.html#ini.output-handler" class="link">output_handler</a></td> <td>NULL</td> <td>PHP_INI_PERDIR</td> <td>Available since PHP 4.0.4.</td> </tr> <tr> <td><a href="outcontrol.configuration.html#ini.implicit-flush" class="link">implicit_flush</a></td> <td>"0"</td> <td>PHP_INI_ALL</td> <td>PHP_INI_PERDIR in PHP <= 4.2.3.</td> </tr> </tbody> </table> For further details and definitions of the PHP_INI_* modes, see the <a href="configuration.changes.modes.html" class="xref">Where a configuration setting may be set</a>. </p> <p class="para">Here's a short explanation of the configuration directives.</p> <p class="para"> <dl> <dt id="ini.output-buffering"> <span class="term"> <em><code class="parameter">output_buffering</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>/<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <p class="para"> You can enable output buffering for all files by setting this directive to 'On'. If you wish to limit the size of the buffer to a certain size - you can use a maximum number of bytes instead of 'On', as a value for this directive (e.g., output_buffering=4096). As of PHP 4.3.5, this directive is always Off in PHP-CLI. </p> </dd> </dt> <dt id="ini.output-handler"> <span class="term"> <em><code class="parameter">output_handler</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <p class="para"> You can redirect all of the output of your scripts to a function. For example, if you set output_handler to <span class="function"><a href="function.mb-output-handler.html" class="function">mb_output_handler()</a></span>, character encoding will be transparently converted to the specified encoding. Setting any output handler automatically turns on output buffering. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> You cannot use both <span class="function"><a href="function.mb-output-handler.html" class="function">mb_output_handler()</a></span> with <span class="function"><a href="function.ob-iconv-handler.html" class="function">ob_iconv_handler()</a></span> and you cannot use both <span class="function"><a href="function.ob-gzhandler.html" class="function">ob_gzhandler()</a></span> and <a href="zlib.configuration.html#ini.zlib.output-compression" class="link">zlib.output_compression</a>. </p> </p></blockquote> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> Only built-in functions can be used with this directive. For user defined functions, use <span class="function"><a href="function.ob-start.html" class="function">ob_start()</a></span>. </p> </p></blockquote> </dd> </dt> <dt id="ini.implicit-flush"> <span class="term"> <em><code class="parameter">implicit_flush</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span> </span> <dd> <p class="para"> <strong><code>FALSE</code></strong> by default. Changing this to <strong><code>TRUE</code></strong> tells PHP to tell the output layer to flush itself automatically after every output block. This is equivalent to calling the PHP function <span class="function"><a href="function.flush.html" class="function">flush()</a></span> after each and every call to <span class="function"><a href="function.print.html" class="function">print</a></span> or <span class="function"><a href="function.echo.html" class="function">echo</a></span> and each and every <em>HTML</em> block. </p> <p class="para"> When using PHP within an web environment, turning this option on has serious performance implications and is generally recommended for debugging purposes only. This value defaults to <strong><code>TRUE</code></strong> when operating under the <em>CLI SAPI</em>. </p> <p class="para"> See also <span class="function"><a href="function.ob-implicit-flush.html" class="function">ob_implicit_flush()</a></span>. </p> </dd> </dt> </dl> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="outcontrol.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="outcontrol.resources.html">Resource Types</a></div> <div class="up"><a href="outcontrol.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>