2017-01-18 67 views
0

的URL地址,我可以導航到一個視圖兩種方式:如何獲得當前重定向頁面

http://test.new.loc/ru/cabinet/intranet/update/ 

http://test.new.loc/ru/plaint

我actionUpdate行動中使用$this->redirect(array('/plaint'));(此網址http://test.new.loc/ru/cabinet/intranet/update/)重定向到這http://test.new.loc/ru/plaint頁面。我使用了下面的代碼var_dump(Yii :: app() - > controller-> action-> id);,但它返回/plaint。但是,我需要獲得/intranet/update/的網址。我怎麼才能得到它?

回答

1

檢查出來...

<?php echo $_SERVER['REQUEST_URI']; ?> 

感謝