Output Control configuration options
Output Control configuration optionsNameDefaultChangeableChangelogoutput_buffering"0"INI_PERDIRoutput_handlernullINI_PERDIRimplicit_flush"0"INI_ALLurl_rewriter.tags"form="INI_ALL As of PHP 7.1.0, this INI setting only affects output_add_rewrite_var. Prior to PHP 7.1.0, this INI setting enabled transparent session id support (see session.trans_sid_tags). url_rewriter.hosts$_SERVER['HTTP_HOST'] is used as default.INI_ALLAvailable as of PHP 7.1.0 Constants
Runtime Runtime
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| output_buffering | "0" | INI_PERDIR | |
| output_handler | null | INI_PERDIR | |
| implicit_flush | "0" | INI_ALL | |
| url_rewriter.tags | "form=" | INI_ALL | As of PHP 7.1.0, this INI setting only affects output_add_rewrite_var(). Prior to PHP 7.1.0, this INI setting enabled transparent session id support (see session.trans_sid_tags). |
| url_rewriter.hosts | $_SERVER['HTTP_HOST'] is used as default. | INI_ALL | Available as of PHP 7.1.0 |
Constants
Title
output_bufferingbool/intOutput buffering for all files can be enabled by setting this directive to
"On". To limit the size of the buffer, a number/quantity corresponding to the maximum numbers of bytes allowed can be used instead of"On"for the value of this directive. For exampleoutput_buffering=4096. This directive is always Off in PHP-CLI.output_handlerstringThe output of scripts can be redirected to a function. For example setting
output_handlertomb_output_handler(), character encoding will be transparently converted to the specified encoding. Setting any output handler automatically turns on output buffering.Notemb_output_handler()andob_iconv_handler()cannot be used together andob_gzhandler()and zlib.output_compression cannot be used with any of the following:mb_output_handler(),ob_gzhandler(), zlib.output_compression, the 'URL-Rewriter' handler (see session.use_trans_sid andoutput_add_rewrite_var()).NoteOnly built-in functions can be used with this directive. For user defined functions, use
ob_start().implicit_flushboolfalse by default. Changing this to true tells PHP to tell the output layer to flush itself automatically after every output block. This is equivalent to calling the PHP function
flush()after each and every call to any function producing output (such asprint()orecho()) and each and every HTML block.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 true when operating under the
CLI SAPI.See also
ob_implicit_flush().url_rewriter.tagsstringurl_rewriter.tagsspecifies HTML tags and attributes in which URLs are rewritten byoutput_add_rewrite_var()values. Defaults to"form=".Adding
"form="or anyformattribute will add a hiddeninputelement to theformwith a name and value attribute for each name-value pair passed tooutput_add_rewrite_var().CautionAdding the same tag more than once to
url_rewriter.tagswill only use the first occurrence during the URL rewriting process.NotePrior to PHP 7.1.0, url_rewriter.tags was used to specify session.trans_sid_tags.
url_rewriter.hostsstringurl_rewriter.hostsspecifies which hosts are rewritten to includeoutput_add_rewrite_var()values. Defaults to$_SERVER['HTTP_HOST']. Multiple hosts can be specified by a comma separated list that does not include spaces. For example"php.net,wiki.php.net,bugs.php.net".