Re: file error
| From: | Michael Virnstein | Date: | Fri, 17 May 2002 12:34:09 +0000 |
| Subject: | Re: file error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98060@lists.php.net to get a copy of this message | ||
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
they
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
ago.
Regards Michael
"Michael Virnstein" <michael.virnstein@brodos.de> schrieb im Newsbeitrag
news:20020517122229.45910.qmail@pb1.pair.com...
> 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
> >
> >
>
>