Thinkphp has a 330 error in the simplest demo.

Source: Internet
Author: User

A new thinkphp demo is created, with an unknown error of 330 err_content_decoding_failed.

CodeIs the simplest, index. php, nothing else

 
<?PHP//Define the project name and PathDefine('App _ name', 'secondhand');Define('App _ path', 'ershou /');Define('App _ debug ',True);//Load the framework entry fileRequire("../Thinkphp. php");?>

 

For online search, the explanation is that gzip conflicts with a PHP file or a webpage!

The method is to disable gzip of Apache or set a certain system background to disable gzip. But I am thinkphp, not a system.

Disable the gzip compression function of Apache. I tried it and tried it again. The key may not be found, or Apache has a built-in gzip function.

 

Later, we found that the encoding of the index. php file was modified. Found the problem solved, the original is: Utf-8 BOM information will appear in the browser gzip decompression failed, there will be 330 error. Code changed to UTF-8 without BOM (modification tool: notepad ++ or other editor that can modify file encoding) problem solving. It's really a fucking problem.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.