NYCPHP Meetup

NYPHP.org

[nycphp-talk] upload error

Craig Thomas craig at juxtadigital.com
Wed Feb 8 17:19:19 EST 2006


aaron wrote:
> I just noticed that some jpg files will get uploaded, but others won't. 
> Strange.
> I'm not sure what the difference is yet.

Post the code.

$_FILES['upload']['type'] doesn't _always_ return the same thing with 
different browsers...so, if you are relying on that...don't.


 From the docs:

http://us3.php.net/features.file-upload

"The mime type of the file, if the browser provided this information. An 
example would be "image/gif". This mime type is however not checked on 
the PHP side and therefore don't take its value for granted."

--
Craig





More information about the talk mailing list