PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Tipurile resurselor> <Instalarea
Last updated: Fri, 25 Jul 2008

view this page in

Configuraţia la rulare

Comportamentul acestor funcţii este afectat de parametrii stabiliţi în php.ini.

The zlib extension offers the option to transparently compress your pages on-the-fly, if the requesting browser supports this. Therefore there are three options in the configuration file php.ini.

Zlib Configuration Options
Name Default Changeable Changelog
zlib.output_compression "0" PHP_INI_ALL Available since PHP 4.0.5.
zlib.output_compression_level "-1" PHP_INI_ALL Available since PHP 4.3.0.
zlib.output_handler "" PHP_INI_ALL Available since PHP 4.3.0.
Pentru mai multe detalii şi definiţii ale constantelor PHP_INI_* accesaţi php.ini directives.

Iată o explicaţie pe scurt a directivelor de configurare.

zlib.output_compression boolean/integer

Whether to transparently compress pages. If this option is set to "On" in php.ini or the Apache configuration, pages are compressed if the browser sends an "Accept-Encoding: gzip" or "deflate" header. "Content-Encoding: gzip" (respectively "deflate") and "Vary: Accept-Encoding" headers are added to the output. In runtime, it can be set only before sending any output.

This option also accepts integer values instead of boolean "On"/"Off", using this you can set the output buffer size (default is 4KB).

Notă: output_handler must be empty if this is set 'On' ! Instead you must use zlib.output_handler.

zlib.output_compression_level integer

Compression level used for transparent output compression.

zlib.output_handler string

You cannot specify additional output handlers if zlib.output_compression is activated here. This setting does the same as output_handler but in a different order.



add a note add a note User Contributed Notes
Configuraţia la rulare
GeoffC at Elyseum dot com
13-May-2008 10:52
zlib.output_compression_level takes an integer from 0 to 9, with max being the most compression. The default value -1 tells the server to use whatever level it wants, and this generally corresponds to level 6.

Tipurile resurselor> <Instalarea
Last updated: Fri, 25 Jul 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites