【发布时间】:2019-08-11 10:42:52
【问题描述】:
维基百科API中有这样一个json:https://ru.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Apple
如何从短文本开始的php中的php字段输出文本?
我试过这样,但没有任何效果:
$url = file_get_contents('https://ru.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Apple');
$yummy = json_decode($url, true);
echo $yummy['extract'];
【问题讨论】:
标签: php