在整天试图找出可能出现问题的地方之后,我不得不问。 这是我正在尝试解码的json文件: http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730&key=4A997F8522CC375E3F9327212B34504D&steamid=76561197996413884
所以,我做了类似的事情:
<div class = "CirclePoint" *ngFor="#c of circles" id = "{{ 'Location' + c.id }}"></div>
this.circles = [
{ x: 50 , y: 50 ,id : "oyut1" },
{ x: 100 , y: 100 ,id : "oyut3" },
{ x: 150 , y: 150 ,id : "oyut2" }
];
var_dump仅从4返回2个内部数组。具体来说,输出为:
$url = "http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730&key=4A997F8522CC375E3F9327212B34504D&steamid=76561197996413884";
$json_data = file_get_contents($url);
$json_decoded = json_decode($json_data, true);
var_dump($json_decoded);
缺少统计数据和成就。建议?
答案 0 :(得分:-2)
假设你想从网址收集所有数据(即GET方法的数据http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730&key=4A997F8522CC375E3F9327212B34504D&steamid=76561197996413884
你应该有这样的东西。
$url = "http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730&key=4A997F8522CC375E3F9327212B34504D&steamid=76561197996413884";
print_r(json_decode($_GET));