2009年1月6日星期二

Re: [fw-mvc] Request Url

Hi Jack,

How about

$this->getRequest()->getPathInfo() . '?' .
http_build_query($this->getRequest()->getQuery());


Untested, but think will work (or at least, the getPathInfo() and
getQuery() methods provide the data that you're asking for).


Cheers,
Thunder

Jack Sleight wrote:
> Hi Everyone,
> Just a quick one. My application sits at:
> http://locahost/projects/newapp/
>
> Therefore my base URI (from Zend_Controller_Request_Http) is:
> /projects/newapp/
>
> And when I request:
> http://locahost/projects/newapp/controller/action?test=123
>
> My request URI (from Zend_Controller_Request_Http) is:
> /projects/newapp/controller/action?test=123
>
> Question is, is there a method (of Zend_Controller_Request_Http)
> that'll return the request URI *without* the base URI? Like this:
> controller/action?test=123
>
> If not (which I don't *think* there is), has anyone written one?
>
> Cheers,

没有评论: