Receive JSON POST with PHP

前端 未结 7 2310
Happy的楠姐
Happy的楠姐 2020-11-21 04:42

I’m trying to receive a JSON POST on a payment interface website, but I can’t decode it.

When I print :

echo $_POST;

I get:

7条回答
  •  一向
    一向 (楼主)
    2020-11-21 05:19

    $data = file_get_contents('php://input');
    echo $data;
    

    This worked for me.

提交回复
热议问题