开发者

Problem with gzip compressing utf-8 encoded php page. HELP!

i use this at top of my php page:

if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
    ob_start("ob_gzhandler");
else
    ob_start();

when page is save with ANSI encoding page was compressed. but when i change page encoding to utf-8 compression was faild. please help!!!

i test compression on ww开发者_JS百科w.gidnetwork.com/tools/gzip-test.php


By guess is that you are including a BOM in your PHP source file when you save in UTF-8 and that's corrupting the compressed stream. Make sure you save in the file in UTF-8 without BOM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜