Yii Framework Forum: Request Url After Index.php?r= - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Request Url After Index.php?r= request Url after index.php?r= Rate Topic: -----

#1 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 850
  • Joined: 20-April 11
  • Location:India

Posted 12 October 2012 - 01:02 AM

i need Url part after index.php?r=

is there any function to get request Url part after index.php?r= like Yii::app()->request->getUrl()
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#2 User is offline   perks 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 06-September 12

Posted 12 October 2012 - 01:22 AM

View PostRajith R, on 12 October 2012 - 01:02 AM, said:

i need Url part after index.php?r=

is there any function to get request Url part after index.php?r= like Yii::app()->request->getUrl()


Why dont you use regex this will help you whatever you want to achieve
0

#3 User is offline   antares 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 19-September 12

Posted 12 October 2012 - 01:25 AM

If you want get name Controller and name Action.
You can use:
$this->id
or
Yii::app()->controller->id
name Controller
and
$this->action->id
or
Yii::app()->controller->action->id
name Action
0

#4 User is offline   seenivasan 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 620
  • Joined: 17-June 12
  • Location:Chennai,TamilNadu,India.

Posted 12 October 2012 - 08:22 AM

Dear Friend

I hope the following would be helpful.
substr(Yii::app()->request->getQueryString(),2);

0

#5 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 850
  • Joined: 20-April 11
  • Location:India

Posted 15 October 2012 - 02:32 AM

View Postseenivasan, on 12 October 2012 - 08:22 AM, said:

Dear Friend

I hope the following would be helpful.
substr(Yii::app()->request->getQueryString(),2);



Thank u
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users