mine type problem.
| From: | Mark Lo | Date: | Sat, 05 Aug 2000 17:51:49 +0000 |
| Subject: | mine type problem. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10261@lists.php.net to get a copy of this message | ||
HI,
Please help me out, i would only let my client to upload gif or jpeg files only. So that I have
set the following code.
upload processing page.
( if I upload a gif file)
echo $userfile_type; -->result image/gif
(so that I have set the rules by not accepting any file types other than gif or jpeg.)
if ($userfile_type!="image/gif" or $userfile_type!="image/jpeg")
{ echo 'not allowed';}
But the problem starts here, when I try to upload a gif of jpeg files, it doesn't let me do so
by printing "not allowed" as stated from the code above. So, it there any methods to
limit the upload file type to only gif or jpeg.
Thank you for your help
Mark Lo