Reply to Re: mime types

Your name:

Reply:


Posted by Steve on 02/20/07 23:13

"bill" <bill@noreturn.co.uk> wrote in message
news:45db6efa$0$8754$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
| Point taken over mime types. I was just trying to find an easy solution
| to allow jpgs on to site. At this stage I am trying to get the site up
| and running for testing. Will let you know how it develops. Thanks for
| your time and advice it is appreciated.

listen, don't cut corners even if you are prototyping something that may be
thrown away. more often than not, a simple, well-written script turns into a
complete application/solution...as does a poorly written one. the point is,
rarely will someone go back and get a prototype production-ready. it just
gets built upon. *always* do your best and *never* program shit on purpose.
EZ is no solution.

there are two ways that verify an image type. one is blatant, the other
requires out-of-the-box thinking...but both are standard to php. get out
there and and find them.

<he steps down from soap box and presses 'send'>

[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

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