php导入excel文件时报错is not readable,如何处理

2025-03-30 18:56:36
推荐回答(1个)
回答1:

你看一下你的文件格式是.xls还是xlsx的,后面的这种,这个读不出来的,
我刚遇到这个问题,你需要转成.xls的格式去读.

$bUpLoad = move_uploaded_file($strUpPath, $strSavePath); if ($bUpLoad) { //echo "上传文件成功! \n"; require_once 'excel/reader.php'; $data = new Spreadsheet_Excel_Reader();$data->setOutputEncoding('gbk'); $data->read($strSavePath); //报错error_reporting(E_ALL ^ E_NOTICE);