The PHP program prompts when accessing Firefox: Content encoding error. The page you are trying to view cannot be displayed because it uses an invalid or unsupported compression format.
The PHP program prompts when accessing Firefox: Content encoding error. The page you are trying to view cannot be displayed because it uses an invalid or unsupported compression format. Under IE it just says 'This page cannot be displayed'. The program uses the ThinkPHP framework. After investigating the cause, it was found that it was caused by the use of ob_start('ob_gzhandler') in the program. The solution is relatively simple: The following two issues may cause this problem. 1. The server does not support this compression format. You can use function_exists('ob_gzhandler') to determine. Solution: change ob_start('ob_gzhandler') to ob_start(); 2. When using ob_start('ob_gzhandler'), the content has been output before. Check the previous content and the content of the require include calling file. If it cannot be found, you can use ob_start() before calling other files, and use ob_end_clean () after calling to clear the output content; The error I encountered was because there was output before ob_start, so the program could not run. |