As far as I can remember It's supplied by the client user agent, hence the big
issue with jpeg images uploaded by IE, as it uses a different type to all the
----- Reply message -----
From: "Richard Quadling" <rquadl...@gmail.com>
Date: Mon, Sep 6, 2010 16:13
Subject: [PHP] Hi
To: "a...@ashleysheridan.co.uk" <a...@ashleysheridan.co.uk>
Cc: "Jordan Jovanov" <jovanovj...@gmail.com>, <firstname.lastname@example.org>
On 6 September 2010 15:04, a...@ashleysheridan.co.uk
> I think you should not focus so much on the file extension, as that is mostly
> meaningless if someone wanted to attack your system.
> Instead, you could wrap a call to the command line 'file' command, which
> gives mostly accurate information about a file. Basically it reads the first
> few bytes to see it is what it expected. There is a php wrapper for this, but
> I forget what its called just now.
> If you do need to just grab a file extension though, you can do it with a
> call to pathinfo() with the 2nd argument of PATHINFO_EXTENSION.
> ----- Reply message -----
> From: "Jordan Jovanov" <jovanovj...@gmail.com>
> Date: Mon, Sep 6, 2010 14:46
> Subject: [PHP] Hi
> To: <email@example.com>
> Cc: <jovanovj...@gmail.com>
> Hi All
> I need me a little help.
> I create scripte for upload file is work very good but the problem is next:
> I neet to upload only .zip file i need to disable some user to shoise to
> upload another file Extensions.
> Can somebody help me.
> Thanks a lot.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
How is the ['type'] arrived at within PHP. Is this supplied by the web
server? Or does PHP have to work it out before passing it to userland
Either way, is it not accurate enough?
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY