You are here: File Headers in IE vs. Firefox « All PHP « IT news, forums, messages
File Headers in IE vs. Firefox

Posted by Lee Marsh on 05/15/05 09:43

Hi, I have a website that allows for users to upload and share pics. Part of
the upload script, of course, is to check whether or not the file being
uploaded is actually a valid picture (jpg, gif, or png) file. Everything
works fine in Firefox. But when I noticed users werent really uploading
anything, I decided to test things out again, and apparently it doesn't work
with IE for some reason. For some reason, IE doesn't think that valid jpg
files are jpegs. What gives? I'm doing this to see what the file type is:
$t = $HTTP_POST_FILES["picture"]["type"];

And here is where things go crazy:
if($t != 'image/jpeg' && $t != 'image/gif' && $t != 'image/png' ){
$HTTP_SESSION_VARS['error'] = 23;
header("Location:http://www.inaneasylum.org/upload.php");
die();
}

All I can figure is that IE is especially particular about its file headers
or something. I'm all ears to suggestions. TIA.
--
<=============>
--Lee
http://www.inaneasylum.org

Goodbye, adios, bis bald, see ya later, wiedersehen, and everything in
between

 

Navigation:

[Reply to this 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

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