Receive JSON POST with PHP

前端 未结 7 2305
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:17

    Use $HTTP_RAW_POST_DATA instead of $_POST.

    It will give you POST data as is.

    You will be able to decode it using json_decode() later.

提交回复
热议问题