//接收前端的数据 $postData储存前端传来的数据
$postData = file_get_contents("php://input");
echo $postData;
//将前端的传来的json格式转为Array
$json_Array=json_decode($postData,true);
//输出为
print_r($json_Array);
效果图
//接收前端的数据 $postData储存前端传来的数据
$postData = file_get_contents("php://input");
echo $postData;
//将前端的传来的json格式转为Array
$json_Array=json_decode($postData,true);
//输出为
print_r($json_Array);
效果图