note 94557 deleted from function.include by peehaa
| From: | peehaa@php.net | Date: | Fri, 09 Dec 2016 22:57:27 +0000 |
| Subject: | note 94557 deleted from function.include by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208404@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
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!