Php writes a cache with no refreshing output, but it is invalid when nginx sets gzip compression. How can I set php to disable gzip output on the current page. I tried to set php. ini to disable it, but it is difficult to make {code...} I think it may be because my gzip output is set through nginx...
Php writes a cache with no refreshing output, but it is invalid when nginx sets gzip compression. How can I set php to disable gzip output on the current page.
I tried to set php. ini to disable it.
ini_set('zlib.output_compression', 'off');
I think it may be because my gzip output is set through nginx.
Of course, you cannot use nginx to disable gzip on the entire site. I only want to disable gzip on the current page. What can I do?
Reply content:
Php writes a cache with no refreshing output, but it is invalid when nginx sets gzip compression. How can I set php to disable gzip output on the current page.
I tried to set php. ini to disable it.
ini_set('zlib.output_compression', 'off');
I think it may be because my gzip output is set through nginx.
Of course, you cannot use nginx to disable gzip on the entire site. I only want to disable gzip on the current page. What can I do?
Nginx configuration file location ~ . *. (Php | php5 )? $ {
Gzip off; # disable gzip fastcgi_pass 127.0.0.1: 9000; fastcgi_index index. php; include fcgi. conf;} If gzip compression is required on a php page, use ob_start ("ob_gzhandler"); ob_start ("compress ");
I have never met such a requirement, but my website adds this code to the top and bottom of the page by enabling gzip compression on the page.
…………