On the Windows platform, when using Firefox to generate website files corresponding to ThinkPHP 3.1.2 version, the following error is reported:
The page you are trying to view cannot be displayed because it uses an invalid or unsupported compression format.
Please contact the owner of the website to inform them of this issue.
After investigation, it was caused by ob_start('ob_gzhandler') in the framework directory ThinkPHP/Lib/Core/App.class.php. The reason is:
The server does not support this compression format. You can use function_exists(' ob_gzhandler') judgment, Solution ob_start('ob_gzhandler') is changed to ob_start();
Line 49 ob_start('ob_gzhandler') is changed to ob_start();
Line 271 ob_start('ob_gzhandler') is changed to ob_start ();
Windows platform does not support file compression in gzip format, so if an error is reported, just correct it to empty parameters.
The above introduces the solution to the problem of error reporting in ThinkPHP312 website compression format under Windows, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.