PHP File Upload Error Codes; UPLOAD_ERR_OK

Reply to comment

If security is an issue, you must never reply on $_FILES['myfile']['type'] as this can be modified by a naughty person. Instead, use exif_imagetype($_FILES["myfile"]["tmp_name"]).