Reply to Re: mime types

Your name:

Reply:


Posted by Steve on 02/20/07 18:56

"bill" <news@noreturn.f9.co.uk> wrote in message
news:45db3e7e$0$8737$ed2619ec@ptn-nntp-reader02.plus.net...
| bill wrote:
| > Can anyone help. I am using the following code to check that jpg image
| > only can be uploaded
| >
| > if ($_FILES['userfile']['type'] != 'image/jpeg')
| > {
| > $msg = 'Problem: file is not jpg';
| > }
| >
| > when uploading a jpg or jpeg this works fine in firefox but when i try
| > to upload a jpg using internet explorer an error is produced saying that
| > it is not a jpg when in fact it is.
| > Can anyone help
| > Thanks
| > bill
|
| checked the file type and IE said it was uploading. It said it was
| image/pjpeg. But it was a jpg.
| put that type into the array and the file uploaded ok.
| To install fiddler i need to install net 1.1. I run apache and will not
| use windows rubbish.

get a clue! a file extension does not a file make. ever consider that it
may, in fact, be a pjpeg? ever consider i may want to hack you by uploading
a script whilst naming it with a .jpg extension? you should do more
validation that what you are...which is next to nothing.

as for 'windows rubbish', tool for the job oh opinionated one...tool for the
job.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация