1
在这里做某人知道如何使用GitHub API? 我试图做一个表检索所有的库提交(https://api.github.com/repos/RubeVi/Fenix/commits)。只想显示沙,但看起来像我的代码是错的GitHub API提交
<?php
$json = file_get_contents("https://api.github.com/repos/RubeVi/Fenix/commits");
$obj = json_decode($json, true);
?>
<table>
<?php foreach ($obj as $o) { ?>
<tr>
<td><?php echo $o["sha"]; ?></td>
<td><?php echo $o["commit"]["author"]["name"]; ?></td>
<td><?php echo $o["commit"]["author"]["email"]; ?></td>
<td><?php echo $o["commit"]["message"]; ?></td>
</tr>
<?php } ?>
</table>
标签的东西正确。 –
...因为你的代码中有错误的URL? – duskwuff
@duskwuff很多事情发生了...伙计... –