note 102314 deleted from function.image-type-to-mime-type by danbrown
| From: | danbrown@php.net | Date: | Tue, 08 Feb 2011 14:10:13 +0000 |
| Subject: | note 102314 deleted from function.image-type-to-mime-type by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176775@lists.php.net to get a copy of this message | ||
Note Submitter: hm2k at php dot net
----
In reply to benshelock, consider this:
<?php
$path='http://www.hpi.co.uk/images/test/';
$file='15635_0_0.9955380731532122_ORIG.jpg';
$size = getimagesize($path.$file);
echo $size['mime']; //returns image/x-ms-bmp
echo $size[2]; //returns 6
?>
It's probably best to always handle it using the numerical value rather than the interpreted
mime type.