When the client submitted, we obtained a $ _FILES array
Array follows
1 $ _FILES [ 'myFile'] [ 'name' original name] client files. 2 $ _FILES MIME type [ 'myFile'] [ 'type '] file, you need to provide support for the information, for example, "Image / GIF" . . 3 $ _FILES [ 'myFile'] [ 'size' ] has uploaded the file size in bytes. 4 $ _FILES [ 'myFile'] after [ 'tmp_name'] file is uploaded in the temporary files stored on the server name, usually the system default. It can be specified in the php.ini upload_tmp_dir, but substituting the putenv () function is provided is ineffective. . 5 $ _FILES [ 'myFile'] [ 'error'] and the error code uploaded file. [ 'error'] was added in PHP 4.2.0. Here is its description :( they became constant after PHP3.0)
UPLOAD_ERR_OK
Value: 0; no error occurred, the file uploaded successfully.
UPLOAD_ERR_INI_SIZE
Value: 1; The uploaded file exceeds the upload_max_filesize in php.ini option to limit the value of
UPLOAD_ERR_FORM_SIZE
Value: 2; The uploaded file size exceeds the value of the HTML form MAX_FILE_SIZE option specified.
UPLOAD_ERR_PARTIAL
Value: 3; file was only partially uploaded
UPLOAD_ERR_NO_FILE
Value: 4; No file was uploaded
Value: 5; upload file size is zero.