PHP files can easily and quickly remove BOM file headers in batches (error after editing PHP in Notepad)

In a utf-8 encoded file, the BOM is in the header of the file, occupying three bytes to indicate that the file belongs to utf-8 encoding. Now there are many software that recognize the BOM header, but some cannot recognize the BOM header, such as PHP. The bom header cannot be recognized, which is also the reason why the execution will go wrong after editing the utf-8 encoding with Notepad. (This is the difference between UTF-8 in Windows and UTF-8 files in Linux).

 

If a lot of PHP files with BOM headers have been made with VS.NET or other tools, is there any easiest way to remove the BOM headers on the Linux server to be distributed? Finally, I found a good tool on the Internet: " Text Web Encoding Batch Conversion Tool".

With this tool you can batch process all PHP files at once.

Download address: http://www.yuneach.com/soft/convert.asp#gb2utf8

 

Batch remove BOM headers from PHP files

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326282972&siteId=291194637