class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
i understand but i would like to directly print an error if extention are not jpg jpg png ,i believe its more clear because its more décourageant si an hacker try some bad extention. If he see successfull with an exe , i will continue to try .. don't you think ?!Reply
The MIME type as sent by the browser is irrelevant, and cannot be trusted.
Here, your file is an image (even tough you changed the file extension), and the class recognizes it as an image, and therefore can process it.
Isn't what you want?
its more décourageant si an hacker try some bad extention.
If he see successfull with an exe , i will continue to try ..
don't you think ?!
That said, if you want to prevent exe files, you can check on file_src_name_ext before calling process()