程式如下:
$total = db_num_rows($rs);
//echo 'total:<br>'.$total.'<br>';
//exit;
if ($total > 0) {
while ($row = db_fetch_object($rs)) {
for ($i = 0; $i < $fields; $i++) {
if (function_exists('mysqli_fetch_field_direct')) {
$fieldinfo = mysqli_fetch_field_direct($rs, $i);
$field_name = $fieldinfo->name;
//echo '$row->$primary_key:'.$row->$primary_key.' => $fieldinfo->name:'.$fieldinfo->name.' => $row->$field_name:'.$row->$field_name.'<br>';
//echo 'i:'.$i.' => '.$fieldinfo->name.' => '.$row->$field_name.'=>'.$row->$primary_key.'<br>';
$result_value[$row->$primary_key][$fieldinfo->name] = $row->$field_name;
} else {
$fname = mysql_field_name($rs, $i);
$result_value[$row->$primary_key][$fname] = $row->$fname;
}
}
}
}
錯誤在
$result_value[$row->$primary_key][$fieldinfo->name] = $row->$field_name;
錯誤訊息為
Warning: Undefined property: stdClass::$ AND name != '根目錄' in C:\web\budget2020\lib\common_wizard.php on line 989
更正:
抱歉,各位,我發現此非該程式有問題,而是引入變數錯誤導致的。已經找到問題了。
我看跟這篇有點像
參考看看