我想获取已发布的数据。但我没有使用任何形式。数据是由带有post
方法的jquery脚本发布的,我想获取它。
我知道如何获取参数
$id = $this->getRequest ()->getParam ( 'id', null );
和表单值
$message = $form->getValue ( 'message' );
但是,我想访问post数据,而不是参数或表单值。有什么想法吗?
发布于 2010-09-19 22:27:07
以下是我的解决方案;)
$this->getRequest()->getPost('id', null);
发布于 2011-03-24 21:36:48
实际上,这可能是你想要的更多。
$this->getRequest()->getRawBody();
https://framework.zend.com/manual/1.12/en/zend.controller.request.html
发布于 2015-01-17 00:59:38
下面是另一个示例:
$this->getRequest()->getPost()->toArray()
https://stackoverflow.com/questions/3745865
复制相似问题