How to remove multiple UTF-8 BOM sequences

后端 未结 11 1797
故里飘歌
故里飘歌 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:21

    if anybody using csv import then below code useful

    $header = fgetcsv($handle);
    foreach($header as $key=> $val) {
         $bom = pack('H*','EFBBBF');
         $val = preg_replace("/^$bom/", '', $val);
         $header[$key] = $val;
    }
    

提交回复
热议问题