我的脚本从我的json_encode PHP返回未定义的值
的index.PHP
PHP
$returnThis['user'] = "Robin098";
$returnThis['id'] = "08465";
echo json_encode($returnThis);
?>
sample.html
PHP",function(data) {
alert(data.user);
});
}
我怎样才能解决这个问题?
最佳答案