我必须导入一个excel数据到我的mysql数据库,但我面临“文件名上传/ dd.xlsx不可读”。我不知道什么是错误,为什么我的Excel表不可读... excelreader2.php的代码是。与PHP使用excelreader2.php将excel数据导入到mysql
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();
}
我做了所有可能结账....任何一个可以理清这个....
您有权限的文件吗?在您的应用试图访问该文件的同时,该文件未在Excel中打开? – Tass 2013-03-20 05:48:02
错误说..“FILE不可读”..只需更改权限 – Svetoslav 2013-03-20 05:49:10
什么类型的权限以及如何更改它???? – Rango 2013-03-20 05:51:14