Re: mine type problem
| From: | Rasmus Lerdorf | Date: | Sun, 06 Aug 2000 21:22:32 +0000 |
| Subject: | Re: mine type problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10376@lists.php.net to get a copy of this message | ||
Just check for both. What's the problem? pjpeg is probably progressive
jpeg.
-Rasmus
On Mon, 7 Aug 2000, Mark Lo wrote:
> 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
>
>