public function read($id)
{
//1すべてのデータを取得
$this ->見る -> assign('aid', $id);
$data=ArticleModel::get($id);
$viewed=$data['viewed'];
$viewed =1;
$data->isUpdate(true)->save(['viewed' => $viewed]);
//2模板赋值
$this ->見る -> assign('data', $data);
//$comment=Comment::order(['id' => 'desc'])-> where(['aid'=>$id,'status'=>1])->paginate(5);
$comment = $this -> CommentListAll($aid=$id,$pid=0,$commentList=array(),$spac=0,$pauthor=NULL);
//$comment=Comment::all();
dump($comment);
$this ->見る -> assign('commentlist', $comment);
return $this-> view ->fetch('detail');
}
$commentList[$i]['pauthor']=$pauthor;
$i ;
$this -> CommentListAll($v['aid'],$v['id'],$commentList,$spac,$v['username']);
}
return $commentList;
//dump($commentList);
}
项目位置->application->config.php->第20行
'app_debug' => false,
改为:
'app_debug' => true,
即可打开调试模式
把调试模式打开呀,然后看具体的报错位置
这个你可以断点调试下。不然错误提示不明显,我们不好判断。
页面错误!请稍后再试~
至少你要给出浏览器的报错信息,否则怎么帮你分析?