phpdev
phpdev

Reputation: 511

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

I used $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 . I used following code var_dump(Yii::app()->controller->action->id);, but it returns /plaint. But, I need to get /intranet/update/ url. How can I get it?

Upvotes: 0

Views: 49

Answers (1)

Nipun
Nipun

Reputation: 157

Check it out...

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

Thanks

Upvotes: 1

Related Questions