1.$_files["File" ["Name"]-the name of the file being uploaded
2.$_files["File" ["type"]-the type of file being uploaded
3.$_files["File" ["Size"]-the size of the uploaded file, measured in bytes
4.$_files["File" ["Tmp_name"]-the name of the temporary copy of the file stored on the server
5.$_files["File" ["Error"]-error code caused by file upload
- 0: Upload Successful
- 1: The size of the uploaded file exceeds the PHP configuration
- 2: Indicates that the upload file size exceeds the value specified by the Max_file_size option in the form
- 3: Indicates that the file was only part of the upload
- 4: No files uploaded
- if ($_files[' up_picture '][' Error ']>0) { / /Determine if the file can be uploaded to the server
- Echo "Upload error:";
- Switch ($_files[' up_picture '] [' ERROR ']) {
- Case 1:
- Echo "The upload file size exceeds the configuration file specified value";
- Break ;
- Case 2:
- Echo "Upload file size exceeds the agreed value in the form";
- Break ;
- Case 3:
- Echo "Upload file not complete";
- Break ;
- Case 4:
- Echo "No files uploaded";
- Break ;
- }