Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Yii::跳转到另一个控制器的操作_Yii - Fatal编程技术网

Yii::跳转到另一个控制器的操作

Yii::跳转到另一个控制器的操作,yii,Yii,对于内部重定向,我使用$this->redirect('whatever'); 这是在RegisterController中。 我有另一个控制器HomeController 在registerController中完成操作后。我想转到Homecontroller中的(主/索引)。我能做什么? 如果你能为yii推荐一本书或一个链接,那就太好了。 提前谢谢。试试这个 $this->redirect(Yii::app()->createUrl('home/index')); 您已经写入“

对于内部重定向,我使用$this->redirect('whatever'); 这是在RegisterController中。 我有另一个控制器HomeController

在registerController中完成操作后。我想转到Homecontroller中的(主/索引)。我能做什么? 如果你能为yii推荐一本书或一个链接,那就太好了。 提前谢谢。

试试这个

$this->redirect(Yii::app()->createUrl('home/index'));

您已经写入“$this->recirect('whatever');”。是打字错误还是“recirect”是正确的单词。很抱歉,它是用来重定向的。您是否尝试使用$this->redirect(数组('home/index'))进行重定向?这是用来重定向的。您在重复自己的问题