What is the difference between $_FILES[“file”][“type”] and end(explode(“.”, $_FILES[“file”][“name”])) [closed]

You’re absolutely correct. The MIME type is provided by the client and you cannot guarantee it is cor­rect. For that matter, so is the file extension. If you need to be completely sure, you need to look at the file contents.

Leave a Comment