Answer the question
In order to leave comments, you need to log in
What does this phrase mean in the documentation?
Hello! I am studying uploading files to the server and came across this phrase in this article :
$_FILES['userfile']['type']
The mime type of the file, in case the browser provided such information. An example would be "image/gif". This mime type is not checked on the PHP side, so don't rely on its value without checking.
Answer the question
In order to leave comments, you need to log in
The documentation says that you should not rely on and use information from $_FILES['userfile']['type'] for serious checks, but you should determine the MIME type of the file yourself, for example, using the mime_content_type function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question