Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Tutorials Getting the current URL in CakePHP
Chris
Posted on 09 Jan 2012, 16:49:27

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Getting the current URL is fairly straight forward

echo Router::url($this->here, true);

This will return the full url http://example.com/subdir

If you just want the relative path, use the following

echo $this->here;
#3681
Last edited by Chris at 2014-01-25 05:48:03 Reason: Fixed title
ashishuk38
Posted on 25 Jan 2014, 05:48:03

Access: Member
Total Posts: 1
Joined: 2014-01-25

See http://webfreelance.info/get-current-url-in-cakephp/

#4068
Network-13.com © 2013