Unable to open remote file.\n";
exit;
}
while (!feof ($file)) {
$line = fgets ($file, 100000);
в результате получаю:
Warning: fopen(http://www.gismeteo.ru/towns/27595.htm) [function.fopen]: failed to open stream: Permission denied in /var/www/html/weather/index.php on line 65
Unable to open remote file.
на серваке делаю # wget http://www.gismeteo.ru/towns/27595.htm
всё прекрасно отрабатывает.. 14:20:38 (93,7 KB/s) - `27595.htm' сохранён [41362/41362]
в чём зихер покрылся? может чёта в конфигурации php?
Исходное сообщение Strong_Gale
Для fopen, насколько я помню, путь до файла указывается на физическом носителе, то бишь: "SomeDrive:\SomeDir\Somefile" или "\somedir\somedir\somefile". Путь может быть абсолютным и относительным. Но fopen работает именно с файловой системой, а не протоколом http (предназначенным для передачи гипертекста)
Исходное сообщение Bangerson
у меня твой код работает, в $line получил то что хотел. попробуй через file_get_contents()
If PHP has decided that filename specifies
a registered protocol, and that protocol is registered as a
network URL, PHP will check to make sure that
allow_url_fopen is
enabled. If it is switched off, PHP will emit a warning and
the fopen call will fail.
Исходное сообщение zhekanax
If PHP has decided that filename specifies
a registered protocol, and that protocol is registered as a
network URL, PHP will check to make sure that
allow_url_fopen is
enabled. If it is switched off, PHP will emit a warning and
the fopen call will fail.
http://ru2.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen
на нормальных хостингах это значение обычно false