我必須導入一個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