Configuration method to enable gzip page compression output in php

WBOY
Release: 2016-07-25 08:58:56
Original
982 people have browsed it
This article introduces how to enable gzip page compression output in PHP for your reference.

Points about configuring gzip compression in php: 1. By default, PHP does not enable zlib whole-site compression output, but uses the ob_gzhandler function for pages that require compressed output. You can only choose one of the two, otherwise an error will be reported. 2. The default value of zlib.output_compression is Off, you can set it to On, or output buffer size (default is 4k) 3. zlib.output_compression_level represents the compression ratio. The default recommended compression ratio is 6. The optional range is 1-9. -1 means turning off php zlib (gzip) compression



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!