note 75720 added to function.file-exists
| From: | florinel2k at yahoo dot com | Date: | Wed, 13 Jun 2007 08:23:10 +0000 |
| Subject: | note 75720 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127441@lists.php.net to get a copy of this message | ||
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
}
----
Server IP: 69.147.83.197
Probable Submitter: 81.180.115.6
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- https://master.php.net/note/edit/75720
Del: integrated -- https://master.php.net/note/delete/75720/integrated
Del: useless -- https://master.php.net/note/delete/75720/useless
Del: bad code -- https://master.php.net/note/delete/75720/bad+code
Del: spam -- https://master.php.net/note/delete/75720/spam
Del: non-english -- https://master.php.net/note/delete/75720/non-english
Del: in docs -- https://master.php.net/note/delete/75720/in+docs
Del: other reasons-- https://master.php.net/note/delete/75720
Reject -- https://master.php.net/note/reject/75720
Search -- https://master.php.net/manage/user-notes.php