我尝试过的事情:
Yii::app()->errorHandler->errorAction='site/error';
并更改为
像errorAction='hi'
这样的东西。哪个回复说不能
找你好。 'errorAction'=>'site/error',
public function actionError() { $this->layout = 'main'; //also tried '//layouts/main' if($error=Yii::app()->errorHandler->error) { if(Yii::app()->request->isAjaxRequest) echo $error['message']; else $this->render('error', $error); } else throw new CHttpException(404, 'Page not found.'); }