2013-06-24 33 views
-1

對於內部重定向我使用$ this-> redirect('whatever'); 這是在RegisterController中。 我有另一個控制器HomeController。Yii ::跳轉到另一個控制器的動作

在registerController中完成操作後。我想去homecontroller中的(home/index)。我可以做什麼? 如果你爲yii建議一本書或鏈接,那將會很棒。 在此先感謝。

+0

你wriiten 「這 - $> recirect( '不管');」。它是一個錯字還是「重定向」是正確的詞。 –

+0

對不起,它意味着重定向。 – Raaj

+0

你嘗試過使用$ this-> redirect(array('home/index'))嗎?這個用於重定向。 – shanavascet

回答

0

試試這個,

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

謝謝Kautil。有效。 – Raaj

相關問題