Validate an image in PHP -


i'm using gd create jpegs files user uploads.

what best way validate image user has uploaded valid?

by valid mean file not corrupt image gd won't like, extension testing client side can upload jpegs/gifs/pngs.

thanks

you use getimagesize. return false if image not loaded. has support image types.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -