我正在尝试使用 Soda API 显示来自 Socrata 的一些数据并收到以下消息
来自服务器的错误“0”:
这是什么意思?
这是我的代码:
$socrata = new Socrata("https://data.medicare.gov", $app_token);
$params = array("\$where" => "starts_with(zip, $model->zipcode)");
$response = $socrata->get("/resource/aeay-dfax.json",$params);
?>
<?= Html::encode($model->zipcode) ?>
<h2>Results</h2>
<?# Create a table for our actual data ?>
<table border="1">
<tr>
<th>Last Name</th>
<th>First Name</th>
</tr>
<?# Print rows ?>
<?php foreach($response as $row) { ?>
<tr>
<td><?= $row["lst_nm"] ?></td>
<td><?= $row["fst_nm"] ?></td>
</tr>
<?php } ?>
</table>
<h3>Raw Response</h3>
<pre><?= var_dump($response) ?></pre>