UTF-8 Byte Order Mark (BOM) in php-Dateien …

closeThis post was published more than three months ago. Please note that the information offered here may no longer be current and valid. Therefore, please inform yourself about this topic elsewhere. If there is any new information, you can also send me a comment. Thank you so much!

for Linux (shell):

 

BOM aus allen PHP-Dateien entfernen:

find . -type f -iname "*.php" -exec sed -i '1s/^\xEF\xBB\xBF//' {} \;

 

PHP-Dateien mit BOM anzeigen:

find . -type f -iname "*.php" -exec grep -l $'\xEF\xBB\xBF' {} \;

 

mehr Infos:

sed – suckup.de/linux/streameditor-sed

find – suckup.de/linux/find-linux

Byte Order Mark – http://de.wikipedia.org/wiki/Byte_Order_Mark

Published by

voku

Lars Moelleken | Ich bin root, ich darf das!