錯(cuò)誤 錯(cuò)誤 錯(cuò)誤
Notice: Undefined variable: comments in D:\phpStudy\WWW\MySQLi2\mysqli\imoocComment\index.php on line 23 Warning: Invalid argument supplied for foreach() in D:\phpStudy\WWW\MySQLi2\mysqli\imoocComment\index.php on line 23 ???要炸了 看不懂了
2018-11-04
加上這個(gè)if就可以了
2018-11-04
if(!empty($comments)){
foreach($comments as $val){
echo $val->output();
}
}
2018-02-02
有個(gè)變量未定義,提示在 foreach() 函數(shù)中那個(gè)變量是無效的,說是在 23 行,你仔細(xì)看看唄