note 25412 added to function.file-exists
| From: | vinceNOSPAM at websitecreations dot co dot nz | Date: | Mon, 23 Sep 2002 01:13:21 +0000 |
| Subject: | note 25412 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37126@lists.php.net to get a copy of this message | ||
For file_exists command:
I have found a quick fast non-fuss way to help you to check if an image file exists via HTTP:
$image_info = @getimagesize("http://$filelocation/$filename");
$type=$image_info[2];
if ($type == 0) {
echo "file doesnt exists";
} else {
echo "the file exists";
}
--
http://www.php.net/manual/en/function.file-exists.php
http://master.php.net/manage/user-notes.php?action=edit+25412
http://master.php.net/manage/user-notes.php?action=delete+25412
http://master.php.net/manage/user-notes.php?action=reject+25412