note 120289 deleted from function.exif-imagetype by cmb
| From: | cmb@php.net | Date: | Wed, 07 Dec 2016 14:15:22 +0000 |
| Subject: | note 120289 deleted from function.exif-imagetype by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208256@lists.php.net to get a copy of this message | ||
Note Submitter: ralimanana1809 at gmail dot com
----
pretending all files that I get exist, to verify if is a valid image, I use:
$a = explode('.',$photo_name);
if(in_array($a[1] , array('GIF', 'JPEG', 'JPG' ,'PNG' ,
'BMP', 'gif', 'jpeg', 'jpg', 'png',
'bmp')))
{
//valid image
}
else{
//not a valid image
}