Yii::跳转到另一个控制器的操作
对于内部重定向,我使用$this->redirect('whatever'); 这是在RegisterController中。 我有另一个控制器HomeController 在registerController中完成操作后。我想转到Homecontroller中的(主/索引)。我能做什么? 如果你能为yii推荐一本书或一个链接,那就太好了。 提前谢谢。试试这个Yii::跳转到另一个控制器的操作,yii,Yii,对于内部重定向,我使用$this->redirect('whatever'); 这是在RegisterController中。 我有另一个控制器HomeController 在registerController中完成操作后。我想转到Homecontroller中的(主/索引)。我能做什么? 如果你能为yii推荐一本书或一个链接,那就太好了。 提前谢谢。试试这个 $this->redirect(Yii::app()->createUrl('home/index')); 您已经写入“
$this->redirect(Yii::app()->createUrl('home/index'));
您已经写入“$this->recirect('whatever');”。是打字错误还是“recirect”是正确的单词。很抱歉,它是用来重定向的。您是否尝试使用$this->redirect(数组('home/index'))进行重定向?这是用来重定向的。您在重复自己的问题