note 94557 added to function.include
| From: | Anonymous at osu1 dot php dot net | Date: | Wed, 11 Nov 2009 19:35:05 +0000 |
| Subject: | note 94557 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162780@lists.php.net to get a copy of this message | ||
I was having problems when HTTP headers were being sent before I was ready. I discovered that this
happened only when I was including a file at the top of my script. Since my included file only
contained PHP with no whitespace outside the tags, this behavior seemed incorrect.
The editor I was using was saving the files in UTF8 format, sometimes including the redundant Byte
Order Mark at the beginning of the file. Any Unicode-aware editor would implicitly hide the
presence of the BOM from the user, making it hard to notice the problem. However, by using a hex
editor I was able to see and remove the three bytes, restoring normal behavior.
Moral: Prevent your editor from adding an invisible Unicode Byte Order Mark to the beginning of
your source code!
----
Server IP: 69.147.83.197
Probable Submitter: 70.166.115.79
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- https://master.php.net/note/edit/94557
Del: integrated -- https://master.php.net/note/delete/94557/integrated
Del: useless -- https://master.php.net/note/delete/94557/useless
Del: bad code -- https://master.php.net/note/delete/94557/bad+code
Del: spam -- https://master.php.net/note/delete/94557/spam
Del: non-english -- https://master.php.net/note/delete/94557/non-english
Del: in docs -- https://master.php.net/note/delete/94557/in+docs
Del: other reasons-- https://master.php.net/note/delete/94557
Reject -- https://master.php.net/note/reject/94557
Search -- https://master.php.net/manage/user-notes.php