Re: file_exists with remote file???
| From: | J. Jones | Date: | Tue, 24 Apr 2001 03:25:22 +0000 |
| Subject: | Re: file_exists with remote file??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50004@lists.php.net to get a copy of this message | ||
On Tue, Apr 24, 2001 at 12:20:01AM -0300, Paulo - Bruc Internet wrote:
> Can anyone help me?
>
> The sintax of function file_exists is:
>
> if(file_exists("ttttt.txt"))
> {
> print...
> }
>
> Does anybody knows how can work with remote files?
> This is not working:
> if(file_exists("http://www.ttttttt.com/ttttt.txt"))
> {
> print...
> }
>
> Thanks for any help,
>
> Paulo Roberto Ens - Brazil
> Bruc Sistemas para Internet Ltda
> mailto:paulo@bruc.com.br
> http://www.bruc.com.br
> ------------------------------------
> Diversão ou Cultura? CuritibaWeb.com - O Melhor Guia de Curitiba!
> http://www.curitibaweb.com
From the manual..
file_exists() will not work on remote files; the file to be examined
must be accessible via the server's filesystem.
Try something like this instead:
if (($fd = fopen ("http://url/file.ext",
"r"))) {
print...
}