Home  >  Article  >  Backend Development  >  How to determine whether the server supports Gzip compression in PHP

How to determine whether the server supports Gzip compression in PHP

WBOY
WBOYOriginal
2016-07-25 08:56:18887browse
  1. phpinfo();
  2. ?>
Copy the code

to browse this page, for example: http://domain name and directory/test.php, for example, this site is: http://bbs.it-home.org/test.php

After opening the page, CTRL+F searches for the following string: _SERVER["HTTP_ACCEPT_ENCODING"] Once found, check to see if there is a gzip parameter following it. If available, this indicates that the space supports Gzip. If there is no gzip parameter, this website cannot use Gzip compression. Please consider other methods at this time.



Statement:
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