$_files Super global variable is special, he is the only two-dimensional array in a predefined super-global array. The role is to store various information about uploading files that are critical to files uploaded to the server via PHP scripts. There are a total of 5 items in this function:
1.$_files["UserFile" ["Error"]
$_files["UserFile" ["error"] Array values provide important information about the results of the upload attempt.
2.$_files["UserFile" ["Name"]
$_files["UserFile" ["name"] variable specifies the original name of the file declared on the client machine, including the extension.
3.$_files["UserFile" ["Size"]
$_files["UserFile" ["Size"] variable specifies the size, in bytes, of the file uploaded from the client.
4. $_files["UserFile" ["Tmp_name"]
$_files["UserFile" ["Tmp_name"] variable specifies the temporary name given to the file after uploading to the server. This is the file name that is specified when stored in the TEMP directory (specified by PHP Directive upload_tmp_dir).
5. $_files["UserFile" ["Type"]
$_files["UserFile" ["type"] variable specifies the MIME type of the file uploaded from the client.
$_files[' myFile ' [' Error '] and the file upload related error code. [' ERROR '] was added in version PHP 4.2.0. Here is a description of it: (they become constants after PHP3.0)
Upload_err_ok
Value: 0; No error occurred and the file upload was successful.
Upload_err_ini_size
Value: 1; The uploaded file exceeds the value of the Upload_max_filesize option limit in php.ini.
Upload_err_form_size
Value: 2; The size of the uploaded file exceeds the value specified by the Max_file_size option in the HTML form.
Upload_err_partial
Value: 3; Only part of the file is uploaded.
Upload_err_no_file
Value: 4; No files were uploaded.
Value: 5; The upload file size is 0.
A common MIME type can refer to this URL: http://www.w3school.com.cn/media/media_mimeref.asp
What I need to upload here is an xls file, then:application/vnd.ms-excel.
The above introduces the way of self-built small station: File upload $_files parameter types, including the content, I hope that the PHP tutorial interested in a friend helpful.