note 75720 deleted from function.file-exists by cmb
| From: | cmb@php.net | Date: | Sun, 29 Sep 2019 07:16:09 +0000 |
| Subject: | note 75720 deleted from function.file-exists by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212386@lists.php.net to get a copy of this message | ||
Note Submitter: florinel2k at yahoo dot com
----
This is an example if you want to know that a file exists (if that file isn't on your server):
$fileUrl = "http://www.examplecom/test.jpg";
$AgetHeaders = @get_headers($sourcePath);
if (preg_match("|200|", $AgetHeaders[0])) {
// file exists
} else {
// file doesn't exists
}