Thinkphp 关闭Gzip header输出问题
Thinkphp默认开启gzip压缩
'OUTPUT_ENCODE' => true, // 页面压缩输出
// 页面压缩输出支持
if(C('OUTPUT_ENCODE')){
$zlib = ini_get('zlib.output_compression');
if(empty($zlib)) ob_start('ob_gzhandler');
}
if(C('OUTPUT_ENCODE')){
ob_flush();
ob_clean();
}
$thumburi = 'Thumb/666.jpg';
$type = getimagesize($thumburi);
header("Content-type: ". $type['mime']);
readfile($thumburi);
die();