On Apr 28, 2007, at 12:21 PM, tedd wrote:
At 9:22 AM -0500 4/28/07, Edward Vermillion wrote:
It should, but instead try this:
$image_size = getimagesize($filename);
echo $image_size['mime'];
$image_size['mime'] ? Where did that come from?
I duno, maybe the manual.
http://us2.php.net/getimagesize <-- 5th or 6th example down.
Ahhh... that's for sending a mime type to the browser. I'd always
just used $image[2] since I usually check against the image constants
in a switch...
switch ($image[2]) {
case IMAGETYPE_JPEG:
// do something with a jpeg...
blah...blah...blah...
}
But it's good to know that the 'mime' bit is there too.
Ed
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php