When you use some editer like notepad etc to edit file and save it to encoding utf-8 , the editer will add a flag in the front of the file , use hexadecimal express was EF BB BF . So convenient in some condition , but in some PHP file , it will occur some error just like: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent...
Very confuzed and waste of time.
So I write a function to cut the BOM to make php file can work correctly: