How to get JSON sent by AJAX to work with PHP

后端 未结 2 1628
离开以前
离开以前 2021-01-26 04:11

I am hitting roadblock after roadblock in my quest to get this JSON usable by PHP, so I\'m wondering if someone can help me out here.

I have JSON being stored in the v

2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-26 05:06

    As @slamborne mentioned in the comment, the correct call is json_decode(file_get_contents('php://input')).

    What your call is doing is actually making another call to divisions.php, which is why you're getting NULL back (it doesn't have any data to return to you, as divisions.php doesn't output anything).

提交回复
热议问题