Discussion: Files types
Afficher un message
Vieux 19/09/2007, 10h15   #1
Bill
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Files types

Can anyone point me in the right direction. I am trying to upload jpg
images and using the following piece of code
$myerror = "no";
$msg = "ok";
$img_types = array('image/jpeg','image/jpg','image/pjpeg');
if (!in_array($_FILES['imagefile']['type'],$img_types))
{
$msg = 'Problem: file is not jpg';
$myerror = "yes";
}
echo $msg;
When I try to download a jpg I still get the problem msg.
Is there something that I am doing wrong that I cant see or is there
another way to do this.
Thanks in advance

Bill
  Réponse avec citation
 
Page generated in 0,05585 seconds with 9 queries