Impact of bom header

Source: Internet
Author: User
The impact of bom header. read the impact of bom header. the following error occurs during setcookie. Cannotmodifyheaderinformation-headersalreadysentby... this error is very common. if any text content is output before setcookie, the above error message is displayed. Because the page header is require, if

The following error occurs during setcookie.

Cannot modify header information-headers already sent ....

This error is very common. if any text content is output before setcookie, the above error message is displayed. Because several files are require in the page header, it is very troublesome to troubleshoot one line. Therefore, I add the following at the top of the page:

PLAIN TEXT
PHP:
Ob_start ();
Add the code before setcookie:

PLAIN TEXT
PHP:
Ob_get_clean ();
This is to obtain the page output before setcookie. After the page is run, an empty string is displayed, that is, no output is provided before setcookie.

Then, use vim to open the source file and find that vim has the bomb option. if you suspect that you have added a hidden string to the code, close it:

Set nobomb

Solve the problem.

What does BOM mean?
BOM is short for "Byte Order Mark", used to Mark the file encoding. Not all text editing tools can recognize BOM tags.

Author: volcano, published at, 2008

Copyright information: This information can be reproduced at will. during reprinting, you must mark the original source and author information of the article in the form of hyperlinks and this statement.

Permanent link-http://www.ooso.net/index.php/archives/378

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.