Previously, we used cleanbom.php to remove the BOM. Today run prompt no exception file, but with fiddler still see the EF BB BF, delete cache also invalid, upload cleanbom.php to production environment also hint no exception.
Here fully despise the next beyond Compare, also blame I will not use. To compare a BOM, you need to use a binary comparison instead of a rule-based comparison.
Why cleanbom.php not be able to find out, guess reason is insufficient permissions, unable to list some folders.
So it's a tutorial on what to do with the Linux system:
grep -r-i-L $'^\xef\xbb\xbf' .
By the way, remember two ways to get rid of the BOM, not yet used
Find sed ' s/\xef\xbb\xbf// ' {} \; #or Echo ' \xef\xbb\xbf123456 ' awk ' {if (nr==1) sub (/^\xef\xbb\xbf/, ""); print} '
Remove BOM under Editor
#去掉: Set nobomb# reserved: Set bomb
Because there is only one file, so, hehe ~
Linux php BOM