note 117016 added to function.exif-imagetype
| From: | vuatintac at yahoo dot com | Date: | Wed, 01 Apr 2015 17:32:43 +0000 |
| Subject: | note 117016 added to function.exif-imagetype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202132@lists.php.net to get a copy of this message | ||
to checking file is image, I used this:
function is_image($path)
{
$a = getimagesize($path);
$image_type = $a[2];
if(in_array($image_type , array(IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP)))
{
return true;
}
return false;
}
----
Server IP: 72.52.91.14
Probable Submitter: 115.77.20.121
----
Manual Page -- http://php.net/manual/en/function.exif-imagetype.php
Edit -- https://master.php.net/note/edit/117016
Del: integrated -- https://master.php.net/note/delete/117016/integrated
Del: useless -- https://master.php.net/note/delete/117016/useless
Del: bad code -- https://master.php.net/note/delete/117016/bad+code
Del: spam -- https://master.php.net/note/delete/117016/spam
Del: non-english -- https://master.php.net/note/delete/117016/non-english
Del: in docs -- https://master.php.net/note/delete/117016/in+docs
Del: other reasons-- https://master.php.net/note/delete/117016
Reject -- https://master.php.net/note/reject/117016
Search -- https://master.php.net/manage/user-notes.php