我必须将excel数据导入我的mysql数据库,但我面临“文件名上传/ dd.xlsx不可读”。我不知道什么是错误,为什么我的excel表不可读... excelreader2.php的代码是。
function read($sFileName) {
$res = $this->_ole->read($sFileName);
// oops, something goes wrong (Darko Miljanovic)
if($res === false) {
// check error code
if($this->_ole->error == 1) {
// bad file
die('The filename ' . $sFileName . ' is not readable');
}
// check other error codes here (eg bad fileformat, etc...)
}
$this->data = $this->_ole->getWorkBook();
$this->_parse();
}
我做了所有可能的结账....任何人都可以解决这个....