mine type problem
| From: | Mark Lo | Date: | Sun, 06 Aug 2000 21:14:03 +0000 |
| Subject: | mine type problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10374@lists.php.net to get a copy of this message | ||
Hi,
I want to let my user only upload gif or jpeg images. So that I have set up the upload script
to prevent from uploading other than gif or jpeg using mine type. Now, I have been facing a mine
type problem with IE 5 and Netscape 4.7. The reasons are that, for IE 5, the mine type for jpeg is
"image/pjpeg", and for Netscape 4.7, the mine type for jpeg is "image/jpeg".
I have set up my script the following way.
if ($userfile_type!="image/pjpeg")
{ error }
Can anyone tell me such that the mine type for IE and Netscape is different or I have made something
wrong to my browser. If the problem is came from the browser, what is the syntex in php to check
for the type of browser.???
Thank you
Mark