JS Ajax calling PHP and getting ajax call data
问题 I have a standard javascript ajax call where I'm setting the data: to json data. $.ajax({ type: "POST", url: BaseUrl + "User/Login", //url: BaseUrl + "User/Limit/1/2", data: '{"apiKey":"c7089786-7e3a-462c-a620-d85031f0c826","appIDGiven":"200","userName":"matt2","password":"pass"}', success: function(data){ console.log(data); }, error: function(request){ console.log(request); }, }); I was trying to get the data in php $_POST["data"] this doesn't work. However, data: 'test={"apiKey":"c7089786