Zend Router Route Regex with Search params
Trying to grab the params afte开发者_如何学Cr ?. I need them to add to the Zend_Paginator. ex: http://www.example.com/test/show?name=xxx&age=20&sex=m Building a paginator for search results. Is there any solution for that ?
$router = new Zend_Controller_Router_Route_Regex(
'test/show\?(.*)',
array(
'controller' => 'test',
'action' => 'show',
'module' => 'user'
),
array(
1 => 'q'
),
'test/show%s'
);
$router_prev->addRoute('view',$router);
Have you tried using the following in the controller?
$this->_request->getParams();
.. or just use the server variable for the query string:
$_SERVER['QUERY_STRING']
精彩评论