Upload File Type Problem....

A

Anonymous

Guest
Hi

Checking $_FILES[file]['type'] isn't fool-proof. Not all browsers will set the mime type of the incoming file.
Like when I want to use that command using IE , it wont show JPEG file type at all!

what is the best way to get upload file type ?
 
but you need to set the enctype="multipart/form-data"
for the form attribute
Code:
<form name="uploadform" enctype="multipart/form-data">....</form>
 
Well I did actually
Ive solved the problem , it was very silly!

MOZILLA and NETSCAPE will know a jjpeg file as IMAGE/JPEG but Internet Explorer recognize that file type as IMAGE/PJPEG !!!!

I have no idea where that P comes from !!! :D

Thanx
 
Back
Top