An error after converting the php file of gb2312 to UTF-8 format

Source: Internet
Author: User
After the php file of GB2312 is converted to the UTF-8 format, the php program will run with the header has sent such an error prompt (when trying to open the session ). Error: Code: Warning: Cannotmodifyheaderinformation-headersalreadysentby (after the php file of outputstartedat/home/yoy GB2312 is converted to UTF-8 format, when the php program is running, the following error message (when trying to open the session) appears ).

The error is as follows:
Code:
Warning: Cannot modify header information-headers already sent by (output started at/home/yoyo/public_html/blog/index. php: 1) in/home/yoyo/public_html/blog/global. php on line 11
?
Warning: Cannot modify header information-headers already sent by (output started at/home/yoyo/public_html/blog/index. php: 1) in/home/yoyo/public_html/blog/global. php on line 35


This error usually occurs when there is output on the page before the session is opened. in IE, there is no output, but in firefox, before the formal page output, there is a garbled byte. This garbled code is the cause of the error (it was output before the session ).

Solution: Find the file with an error prompt, download it, open it with the editor (the latest editplus version is recommended), copy the code, delete the file, and recreate a new file, copy the code just now, when saving files, must be saved into a UTF-8, upload overwrite the original file, should be good.

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.