这就是ajax调用的样子
$.ajax({
url: 'http://localhost/placeadd.php',
dataType: "json",
type: "POST",
data: {
"location": {
"lat": -33.8669710,
"lng": 151.1958750
},
"accuracy": 50,
"name": "Daves Test!",
"types": ["shoe_store"],
"language": "en-AU"
},
success: function( data){
console.log(data.status+"<BR>");
},
error: function(request, status, error){
console.log(status+"<BR>");
}
})
})
我将如何访问 php 文件中的每个元素?例如访问“lat”是否只是 $_POST."location"."lat"?