Configurazione di Runtime

Il comportamento di queste funzioni รจ influenzato dalle impostazioni di php.ini.

Output Control configuration options
Nome Default Modificabile Storico dei cambiamenti
output_buffering "0" PHP_INI_PERDIR  
output_handler NULL PHP_INI_PERDIR  
implicit_flush "0" PHP_INI_ALL  
url_rewriter.tags "a=href,area=href,frame=src,form=,fieldset=" PHP_INI_ALL Before PHP 7.1.0, this was used to set session's trans sid rewrite. From PHP 7.1.0, it is only used by output_add_rewrite_var().
url_rewriter.hosts $_SERVER['HTTP_HOST'] is used as default. PHP_INI_ALL Available as of PHP 7.1.0
Per maggiori dettagli e definizioni sui modi PHP_INI_*, vedere Where a configuration setting may be set.

Breve descrizione dei parametri di configurazione.

output_buffering bool/int

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). This directive is always Off in PHP-CLI.

output_handler string

You can redirect all of the output of your scripts to a function. For example, if you set output_handler to mb_output_handler(), character encoding will be transparently converted to the specified encoding. Setting any output handler automatically turns on output buffering.


You cannot use both mb_output_handler() with ob_iconv_handler() and you cannot use both ob_gzhandler() and zlib.output_compression.


Only built-in functions can be used with this directive. For user defined functions, use ob_start().

implicit_flush bool

false 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 print or echo 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.tags string
url_rewriter.tags specifies which HTML tags are rewritten by output_add_rewrite_var() values. Defaults to a=href,area=href,frame=src,input=src,form= form is special tag. <input hidden="session_id" name="session_name"> is added as form variable.

Nota: Before PHP 7.1.0, url_rewriter.tags was used to specify session.trans_sid_tags. As of PHP 7.1.0, fieldset is no longer considered as special tag.

url_rewriter.hosts string
url_rewriter.hosts specifies which hosts are rewritten to include output_add_rewrite_var() values. Defaults to $_SERVER['HTTP_HOST']. Multiple hosts can be specified by ",", no space is allowed between hosts. e.g.,,

add a note add a note

User Contributed Notes 1 note

support at losalgendesign dot com
10 years ago
Using "OFF" or no value on output_buffering will disable header modifications, like redirects or content-type or content-disposition resulting in the error we commonly attribute to output before header modifications:

Warning: Cannot modify header information - headers already sent by (output started at C:\PATH\filename.php:1) C:\PATH\filename.php on line 1

Example code with output_buffering = OFF which results in this behavior.  Changing it to "ON" or giving it a value will likely cause normal behavior.

<?php header("Location:"); ?>


<?php header("Content-Type: text/Calendar"); ?>
<?php header
("Content-Disposition: inline; filename=appointment.ics"); ?>
To Top