title: How to prevent uploading image or file having executable code in php or using htaccess
body: <p>I want to check whether the image or file is executable code or not and disallow them to upload. I already checked mime type by <strong>getimagesize()</strong> but still unable to stop file having code that file includes <strong>GIF89a1</strong> to convert this file pretend as <strong>mime type - gif</strong>. How can I secure my code to check these kinds of files used by hackers. Please let me know.</p>