How to get body of a POST in php?

后端 未结 8 1805
小蘑菇
小蘑菇 2020-11-22 01:25

I submit as POST to a php page the following:

{a:1}

This is the body of the request (a POST request).
In php, what do I have to do to

8条回答
  •  你的背包
    2020-11-22 01:34

    If you have the pecl/http extension installed, you can also use this:

    $request = new http\Env\Request();
    $request->getBody();
    

提交回复
热议问题