How PHP gets an array of JSONP
This post was last edited by zl2727 on 2014-01-09 14:19:55
var urlstr = "{GID: '" + $ ("#hogid"). Val () + "', Name: '" + $ ("#txtName"). Val () + "', Provinceid: '" + $ ("#ProvinceID"). Val () + "', Cityid: '" + $ ("#CityID"). Val () + "', Areaid: '" + $ ("#AreaID"). Val () + "', Moblie: '" + $ ("#txtMobile"). Val () + "', Address : ' "+ $ (" #txtAddress "). Val () +" ', PayType: ' "+ Itemvalue +" '} ";
$.ajax ({
URL: "http://www.xxx.com/car.php",
Type: "POST",
DATA:URLSTR,
Async:false,
DataType: ' Jsonp ',
JSONP: "Callback",
Success:function (data) {
alert (data.res);
},
Error:function (Err) {
Alert ("Network load busy, please refresh!") ");
}
});
How to get to data
In my php file
$urlstr = $_post;
Echo $urlstr. Name;
What is there to write?
Share to: more
------Solution--------------------
File_put_contents (' Test.txt ', Print_r ($_get, 1));
See the contents of the file Test.txt