note 82332 deleted from function.filetype by felipe
| From: | felipe@php.net | Date: | Wed, 09 Apr 2008 22:33:01 +0000 |
| Subject: | note 82332 deleted from function.filetype by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138082@lists.php.net to get a copy of this message | ||
Note Submitter: varun dot m dot ajani at gmail dot com
Reason: 2
----
While using a statement to check if a file is a jpeg image, one may use something like:
if($image['type']=='image/jpeg'){
etc.code
}
This works fine in firefox but IE6 makes a distinction between jpeg and pjpeg(progressive jpeg).
To make sure the statement evaluates correctly in firefox and IE6 both, use:
if(($image['type']==('image/jpeg')||('image/pjpeg')){
etc.code
}