我是 PHP 和 ZEND 的新手。在将它们插入数据库之前,我读取了 excel 文件并检查了值。
for ($row = 2; $row <= $highestRow; ++$row) {//MM
$items = array();
for ($col = 1; $col < $highestColumnIndex; ++$col) {
$cell = $objWorksheet->getCellByColumnAndRow($col, $row);
$items[] = $cell->getValue();
$items[]=trim($items[]);
if ($col = 2) { continue;
}else{
$items[]=preg_replace("/^[-\s]$/", "", $items);// or abs($items[]);
if(!is_numeric ($items)){
$items[]=null;
}
}
}
$rating = mysql_escape_string($items[0]);
and so on...
我收到此错误:
Fatal error: Cannot use [] for reading in C:\Program Files\Apache Software Foundation\httpd-2.2.21\htdocs\project\zend\application\modules\admin\models\bankranking\BankRankAdmin.php on line 204