$_FILE:
By using this super global variable we can get the information of uploaded files. It is two dimensional array variable contains five elements. Each element’s first dimension is name of upload control.
If user is uploaded a file from browser to server or the file transfer to server. In temporary memory location stores with another name. We have to implement PHP code to move that file from temporary memory location to the permanent memory location.
- $_FILE is used to tell some information about uploaded files.
- $_FILES[‘name of upload file’] [‘name’]
By using this element we can get uploaded file name - $_FILES[‘name of upload file’] [‘size]
By using this file we can get uploaded file size - $_FILES[‘name of upload file’] [‘error’]
To get the error if any occurred in the time of uploading the file - $_FILE[‘name of upload file’] [‘type’]
To get the MIME type of uploaded file - $_FILES[‘name of upload file’] [‘tmp_name’]
To get temporary location file name.