Use Zend Framework in non-rewriting mode?
currently $ctrl->view->url()
keeps building urls like this:
http://开发者_运维知识库host.com/user/profile/123
but I want it to be like this:
http://host.com/index.php?controller=user&action=profile&id=123
And I hope Zend can recognize all these Params by $ctrl->request()->getParam()
Is there any way to do it? Thank you very much in advance
If you want to build an URL like that you do not need a view helper, do you? ;)
My guess it you need this for the params, so here's what i think will help you
//view.phtml
$this->url(array(
'controller'=>'user',
'action'=>'profile',
'id'=>'123'
));
The above will output http://www.name.tld/user/profile/id/123
which is equivalent to the link given above.
精彩评论