Re: file error
| From: | Michael Virnstein | Date: | Fri, 17 May 2002 12:22:27 +0000 |
| Subject: | Re: file error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98055@lists.php.net to get a copy of this message | ||
i do not know if file() can be used with files on remote servers.
fopen() can, if this feature is enabled in php.ini.
Regards Michael
"Roman Duriancik" <rduriancik@indprop.gov.sk> schrieb im Newsbeitrag
news:BGEDJJKMAKMHFNBGMBECEEDPCKAA.rduriancik@indprop.gov.sk...
> I have this code :
> $text =
> file("http://www.hokej.sk/spravy/?id=16159");
> echo count($text);
> for ($i=0;$i<count($text);$i++):
> echo $text[$i];
> endfor;
>
> when in file commnad i insert page from local net or our web server this
> script run correctly but if i insert page from internet i have this error
> event
>
> Warning: php_hostconnect: connect failed in
> d:\programovanie\php\ftp\skuska.php on line 2
>
> Warning: file("http://www.hokej.sk/spravy/?id=16159")
> - Bad file
descriptor
> in d:\skuska.php on line 2
>
>