php - ErrorHandling in Yii -
i have developed web application using yii, can't rich error handling solution.
this code
config/main.php
'components'=>array( 'errorhandler'=>array( // use 'site/error' action display errors 'erroraction'=>'site/error', ), ),
sitecontroller
public function actionerror() { if($error=yii::app()->errorhandler->error) { if(yii::app()->request->isajaxrequest) { echo $error['message']; } else $this->render('error', array('error'=>$error)); } }
then not work
showing
how can reach solution?
this problem solved itself.
how solved problem
add error function on inside accessrules function
and comment config/main.php
/* array( 'class'=>'cweblogroute', 'enabled'=>defined('yii_debug'), ), */
that's
hope
Comments
Post a Comment