of file-----------
*/
ob_start();
ob_implicit_flush(0);
function CheckCanGzip(){
global ;
if (headers_sent() ││ connection_timeout() ││ connection_aborted()){
return 0;
}
if (strpos(, 'x-gzip') !== false) return "x-gzip";
if (strpos(,'gzip') !== false) return "gzip";
return 0;
}
/* = compression level 0-9, 0=none, 9=max */
function GzDocOut(=1,=0){
= CheckCanGzip();
if (){
print "\n\n";
= ob_get_contents();
ob_end_clean();
if (){
= "
Not compress length: ".strlen();
.= "
Compressed length: ".strlen(gzcompress(,));
.= ;
}
header("Content-Encoding: ");
print "\x1f\x8b\x08\x00\x00\x00\x00\x00";
= strlen();
= crc32();
= gzcompress(,);
= substr(, 0, strlen() - 4);
print ;
print pack('V',);
print pack('V',);
exit;
}else{ &
*/
ob_start();
ob_implicit_flush(0);
function CheckCanGzip(){
global ;
if (headers_sent() ││ connection_timeout() ││ connection_aborted()){
return 0;
}
if (strpos(, 'x-gzip') !== false) return "x-gzip";
if (strpos(,'gzip') !== false) return "gzip";
return 0;
}
/* = compression level 0-9, 0=none, 9=max */
function GzDocOut(=1,=0){
= CheckCanGzip();
if (){
print "\n\n";
= ob_get_contents();
ob_end_clean();
if (){
= "
Not compress length: ".strlen();
.= "
Compressed length: ".strlen(gzcompress(,));
.= ;
}
header("Content-Encoding: ");
print "\x1f\x8b\x08\x00\x00\x00\x00\x00";
= strlen();
= crc32();
= gzcompress(,);
= substr(, 0, strlen() - 4);
print ;
print pack('V',);
print pack('V',);
exit;
}else{ &
| 对此文章发表了评论 |
