【发布时间】:2015-04-07 18:24:36
【问题描述】:
我编写了一个简单的脚本来获取页面的内容。 当我在 Apache 服务器上运行它时,我收到一个错误:
file_get_contents 未定义
Apache 2.2、PHP 5.3.9。代码如下:
$url = "http://steamcommunity.com/market/priceoverview/?appid=730&country=PL¤cy=3&market_hash_name=Desert%20Eagle%20%7C%20Blaze%20(Minimal%20Wear)";
$json = file_get_contents($url);
$price = json_decode($json);
alert(price.lowest_price);
如何解决?
【问题讨论】:
-
嗯,什么? ........这似乎不可能?
-
有可能。你是在本地运行吗?
-
@unixmiah 是的,我是。