dpxpz37157 2009-07-13 18:26
浏览 24
已采纳

如何检查我的共享主机提供商是否安装了mod_gzip?

Is there a way to check if my hosting provider has mod_gzip enabled? It's not mentioned in any info on the web site, nor there is a forum to contact other people about this problem. Thanks.

  • 写回答

3条回答 默认 最新

  • duanmeng1950 2009-07-13 18:28
    关注

    You can check that with either PHP’s apache_get_modules or phpinfo.

    If you want to compress your output, you might want to try the output buffer handler ob_gzhandler. It automatically determines what type of content encoding the browser will accept ("gzip", "deflate" or none at all) and will return its output accordingly. Just put ob_start('ob_gzhandler') at the start of your script file (before anything is put out) and it does the rest.

    Or you simply use Apache’s mod_deflate that even can compress static files that are directly passed through to the client.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?