问题
In zendframework ,When i am moving to new page with parameters using code as
$this->_helper->redirector('my-action','my-controller',null,$params-array);
,
it showing parameters in every url in application. Can anybody help me in this?
回答1:
You can use
$params = array('user' => $user, 'mail' => $mail);
$this->_helper->redirector($action, $controller, $module, $params);
Thanks
回答2:
you can try this
$this->_redirect('Controllername/action?para1=value¶2=value');
Try this it'work
I hope it helps you....
回答3:
The url() view helper is provided by Zend Framework 2 and is used to create the links we need. The first parameter to url() is the route name we wish to use for construction of the URL, and the second parameter is an array of all the variables to fit into the placeholders to use. In this case we use our ‘album’ route which is set up to accept two placeholder variables: action and id.
来源:https://stackoverflow.com/questions/11554051/url-passing-parameters-in-zend-framework