由于 phpoffice/phpexcel 包不再维护,迁移到 phpoffice/phpspreadsheet 后,读取csv文件时存在问题,xls和xlsx文件类型正常(但大批量数据必须得用csv的文件),
$excelFilePath = $_FILES['fileInput']['tmp_name'] //直接表单上传文件
不管是用 $objReader = IOFactory::createReader("Csv"); $excelReader = $objReader->load($excelFilePath);
还是 $objReader = new Csv(); $excelReader = $objReader->load($excelFilePath);
或者 $excelReader = IOFactory::load($excelFilePath);
都会存在

这类错误
先改成原生写法算了