我使用Yii 1.1.17,并在我的行动,我有
$this->redirect(url('sell/default/index'), true, 403);
我得到的是一个空白页。甚至在日志中没有错误。但这个工程
$this->redirect(url('sell/default/index'));
问题是,我想设置一个403错误,所以我不上谷歌获得了软404错误。
我也试过this,但我仍然得到同样的结果。
有任何想法吗?
如果你抛出一个异常...!
throw new CHttpException(403,'Your Error message');
throw new HttpException(403, Yii::t('app', 'You are not allowed to perform this action.'));