How to remove multiple UTF-8 BOM sequences

后端 未结 11 1793
故里飘歌
故里飘歌 2020-11-22 10:28

Using PHP5 (cgi) to output template files from the filesystem and having issues spitting out raw HTML.

private function fetch($name) {
    $path = $this->         


        
11条回答
  •  逝去的感伤
    2020-11-22 11:19

    Another way to remove the BOM which is Unicode code point U+FEFF

    $str = preg_replace('/\x{FEFF}/u', '', $file);
    

提交回复
热议问题