PHP读取CSV文件 移除 BOM头的方法,兼容判断是否有BOM头的方法 public function dump() { $file = "f:/logs/202012/test.csv"; $lines = []; $need = substr(file_get_contents($file), 0, 3)