php输出gzip压缩

functionob_gzip($content){if(!headers_sent()&&extension_loaded(“zlib”)&&strstr($_server[“http_accept_encoding”],”gzip”)){
$content = gzencode($content,9);
header(“content-encoding: gzip”);
header(“vary: accept-encoding”);
header(“content-length: “.strlen($content));
}
return$content;
}
ob_start(‘ob_gzip’); //函数名echo”这是测试字符串这是测试字符串这是测试字符串”;
ob_end_flush();

‘).addclass(‘pre-numbering’).hide();
$(this).addclass(‘has-numbering’).parent().append($numbering);
for (i = 1; i

Posted in 未分类

发表评论