我已经在一个网页上使用这个代码大约两年了,突然它开始给我一个错误。有什么明显的原因吗?这些是错误中引用的第116到120行
$file = fopen("http:/xxxxxx/climo/reports/".$fileName, "r");
$content = fgetcsv($file, 1000, ",");
$id = 1;
while ($content = fgetcsv($file, 1000, ",") != FALSE) {错误
.gov/climo/reports/today_raw_hail.csv) [function.fopen]: failed to open stream: no suitable wrapper could be found in /homepages/27/xxxx/htdocs/xxxxx/weather/php/mainEngine.php on line 116
Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /homepages/27/xxxxx/htdocs/xxxx/weather/php/mainEngine.php on line 117
Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /homepages/27/xxxx/htdocs/xxxx/weather/php/mainEngine.php on line 120发布于 2013-05-25 02:49:03
您的主机可能更新了php.ini中的'allow_url_fopen‘指令
http://php.net/manual/en/filesystem.configuration.php
发布于 2013-05-25 02:49:03
显然,您的主机提供商放弃了对http:// urls的支持(如您在错误中所见)。
请尝试使用curl读取csv。
https://stackoverflow.com/questions/16741662
复制相似问题