thinkphp开启GZIP压缩

在项目的入口文件index.php添加

define ( "GZIP_ENABLE", function_exists ( 'ob_gzhandler' ) );
ob_start ( GZIP_ENABLE ? 'ob_gzhandler' : null );

就可以实现了   如下图

评论

暂无评论