【发布时间】:2015-06-09 09:11:16
【问题描述】:
当我尝试将 file_get_contents 输出存储到 obj 中时,我的代码遇到问题。
$json = file_get_contents($url);
$obj = json_decode($obj);
我不允许更改 ini.php 中的内存大小,因为它在服务器上。还有其他解决方案吗?
【问题讨论】:
-
请检查此解决方案 - 它使用逐个下载文件stackoverflow.com/questions/4000483/… 之后您可以使用
file_get_contents($local_file)就可以了。