[英]How to get url address of current redirecting page
I can navigate to one view in two ways: 我可以通过两种方式导航到一个视图:
http://test.new.loc/ru/cabinet/intranet/update/
and http://test.new.loc/ru/plaint
和
http://test.new.loc/ru/plaint
I used $this->redirect(array('/plaint'));
我用
$this->redirect(array('/plaint'));
in actionUpdate action (for this url http://test.new.loc/ru/cabinet/intranet/update/
) to redirect to this http://test.new.loc/ru/plaint
page . 在actionUpdate操作(针对此URL
http://test.new.loc/ru/cabinet/intranet/update/
)中,以重定向到此http://test.new.loc/ru/plaint
页面。 I used following code var_dump(Yii::app()->controller->action->id);, but it returns /plaint
. 我使用了以下代码var_dump(Yii :: app()-> controller-> action-> id);,但返回了
/plaint
。 But, I need to get /intranet/update/
url. 但是,我需要获取
/intranet/update/
网址。 How can I get it? 我怎么才能得到它?
Check it out... 看看这个...
<?php echo $_SERVER['REQUEST_URI']; ?>
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.