I’ve recently wondered how I can get the full url address of a requested controller/action in Zend php framework.
After some tries I finally did it:
Here is how to achieve it:
$fullUrl = "http://". $this->getRequest()->getHttpHost() . $this->view->url();
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Hey long time now see, thanks for dropping back again! 🙂
Download PDF Tags: How to get full url to accessed controller action in Zend php framework
This entry was posted on Tuesday, June 29th, 2010 at 8:48 pm and is filed under Linux, Programming, System Administration. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22
exactly what I needed! Thanks for sharing!
View CommentView Comment