Zend Framework forward request with post http method

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:58:21

问题


Using Zend Framework 1.7. Is possible to forward a request with POST method? Something like this:

$this->_forward('action','controller','module',array('method'=>'POST'));

回答1:


Yes this is possible, Try using following:

$this->_request->setPost(array('param_name' => $paramValue));
$this->_forward('actionName', 'controller', 'module');


来源:https://stackoverflow.com/questions/24954155/zend-framework-forward-request-with-post-http-method

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