【发布时间】:2013-01-06 19:22:47
【问题描述】:
我在使用来自 http://api.justin.tv/api/stream/list.json?channel=Herdyn 的 Json 时遇到问题,我需要获取一些关于直播的信息。
我的代码:
<?php
$json = file_get_contents('http://api.justin.tv/api/stream/list.json?channel=Herdyn');
$obj = json_decode($json);
echo $obj->{'name'};
?>
当我上传到服务器时:http://blx.patrikpapso.com/herdyn/,没有错误,只是空白页,不知道该怎么办......
【问题讨论】:
-
你确定你启用了错误报告?
标签: php json file-get-contents