url passing parameters in zend framework

痴心易碎 提交于 2019-12-25 03:07:32

问题


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&para2=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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!