That's what i found about file():

Tip: You can use a URL as filename with this function if the "fopen
wrappers" have been enabled. See fopen() for more details.

So check your php.ini settings. If you're hosted by a hosting company and
failed to enable the fopen wrappers, you can overwrite their php.ini with
your own.
Simply place a file called php.ini in the document_root of your domain and
this php.ini will get loaded instead of the php.ini of your hosting company.
Nice and undocumented feature, which i found here in this list a few weeks

Regards Michael

"Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> 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" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > I have this code :
> >  $text = file("";);
> >   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
> > event
> >
> > Warning: php_hostconnect: connect failed in
> > d:\programovanie\php\ftp\skuska.php on line 2
> >
> > Warning: file("";) - Bad file
> descriptor
> > in d:\skuska.php on line 2
> >
> >

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to