Get post data, Zend Framework

前端 未结 4 2149
粉色の甜心
粉色の甜心 2021-02-18 22:59

I want to fetch posted data. But I am using no form. The data is postet by a jquery script with method post and I would like to fetch it.

I know how to fet

相关标签:
4条回答
  • 2021-02-18 23:22

    Here is an other example:

    $this->getRequest()->getPost()->toArray()
    
    0 讨论(0)
  • 2021-02-18 23:23

    Actually, this might be more of what you're looking for.

    $this->getRequest()->getRawBody();
    

    https://framework.zend.com/manual/1.12/en/zend.controller.request.html

    0 讨论(0)
  • 2021-02-18 23:29

    Here is my solution;)

    $this->getRequest()->getPost('id', null);
    
    0 讨论(0)
  • 2021-02-18 23:37

    Try this:

    $request = $this->getRequest();
    $request->getPost('field_name');
    
    0 讨论(0)
提交回复
热议问题