• 接收json格式数据

    header('Content-type: application/json');  
    $input = file_get_contents('php://input');
    $res = json_decode($input, true);