1
以下是从另一个问题:Handling data in a PHP JSON Object:问题与JSON的file_get_contents取
$jsonurl = "http://search.twitter.com/trends.json";
$json = file_get_contents($jsonurl, 0, null, null);
$json_output = json_decode($json);
foreach ($json_output->trends as $trend)
{
echo "{$trend->name}\n";
}
我的问题:什么是这两个之间的区别:我检查file_get_contents()
PHP manual
file_get_contents($jsonurl,0,null,null)
file_get_contents($jsonurl)
,但仍然不完全了解它,换句话说,如果我使用这条线:
file_get_contents($jsonurl)
会发生什么?