我有个问题。我怎样才能得到结果?
这是我的代码:
<?php
$api_e = file_get_contents('https://omnihost.tech/dashboard/hosts/'.$slug.'/api_ftp');
$api = json_decode($api_e); ?>
<?php foreach($api as $file){ ?>
<tr>
<td>#</td>
<td><?= $file; ?></td>
<td>--</td>
</tr>
<?php } ?>
我的 JSON 是:
{"data": [".","..",".editorconfig",".gitignore",".htaccess",".well-known","README.md","application","assets","cgi-bin","composer.json","contributing.md","index.php","license.txt","readme.rst","system"]}
错误:http : //prntscr.com/o98xau
12345678_0001