I have a basic form to upload files, my problem is about the mime type.
I use $type= $_FILES[$file_uploaded]['type']; to check the mime-type of the fila as I want to allow only .jpeg.
I have then a test like:
if ($type=="image/pjpeg" || $type=="image/jpeg")
Upload working fine if I send "red.jpg".
However if I rename the file in "red", php recognizes it as application/octet-stream and not jpeg.
I'm working under linux and for me the extension is not required for a file, I thought the mime-type was encoded in the file itself and was independent of the extension.
Any clue on that?
Any other php function I should look at?
The cookbook and pear both use $_FILES[ ] ['type'] so I have no idea here.
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php