Files types
- From: Bill <news@xxxxxxxx>
- Date: Wed, 19 Sep 2007 10:15:40 +0100
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
.
- Follow-Ups:
- Re: Files types
- From: Janwillem Borleffs
- Re: Files types
- Prev by Date: Re: secure email
- Next by Date: Re: Files types
- Previous by thread: Re: secure email
- Next by thread: Re: Files types
- Index(es):
Relevant Pages
|