Zend Framework forward request with post http meth

2019-09-17 03:34发布

问题:

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');