05-29-2008, 06:57 PM
|
#11 (permalink)
|
|
The Acquainted
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
|
To check the mime type I'm using:
Code:
$mimetypes = array('image/jpeg', 'image/png', 'image/pjpeg', 'image/gif');
$mimetype = strtolower($_FILES['uploadedfile']['type']);
if (in_array($mimetype,$mimetypes)){
//do upload photo stuff
}else{
echo "File format not recognised (mime) - $mimetype";
}
I added the "$mimetype" to the error so I could see what it was comparing to the array but it just comes up blank.
|
|
|