RE: [PHP-WIN] file_exists()
| From: | Dash McElroy | Date: | Mon, 18 Nov 2002 18:57:43 +0000 |
| Subject: | RE: [PHP-WIN] file_exists() | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-17018@lists.php.net to get a copy of this message | ||
DaMouse:
Try looking at www.php.net/fopen : the 3rd comment should work:
To check if a file exists using http or ftp use the following:
$fp = @fopen("http://www.someurl.com/testfile.php3","r");
if ($fp)
{ print"The file exists!"; }
else
{ print"The file does not exist"; }
Note: The "@" in front of fopen suppresses the error output of the
function.
I hope this clears up some confusion.
-Dash
-----Original Message-----
From: DaMouse [mailto:damouse@ntlworld.com]
Sent: Sunday, November 17, 2002 1:36 PM
To: PHP - Win
Subject: [PHP-WIN] file_exists()
is there a way to find if a file exists on a remote server?
Ensign Baker
HCO Officer
USS Atlantis