php入门4 解析json对象
程序员文章站
2022-05-17 13:52:36
...
functionlogging()
{var x = new XMLHttpRequest();
x.onreadystatechange =function()
{if(x.readyState == 4) {
if(x.status == 200) {
console.log("The server replied with: " + x.responseText);
txt.text = x.responseText;
}
}
};
var xxx = newObject;
xxx.id=289672082;
xxx.pwd = '12345';
var pcode= JSON.stringify(xxx);
x.open("GET","http://localhost/mycode/Test/index.php?code="+pcode);
x.send(null);
}
解析
$pcode = $_GET['code'];
$obj = json_decode($pcode);
echo$obj->id . "," . $obj->pwd;
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i ').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了 php入门4 解析json对象,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。