When using PHP to upload files, we will use the program to listen to the browser sent over the file information, the first will be $_files[fieldname][' error ' of the different values to determine whether the file status is normal. $_files[fieldname] [' ERROR ']==0 stands for all normal, the other values of the specific meaning please refer to the following paragraph of the comment section of the program, if there is no translation of the place also look correct!
Switch ($_files[$field [' ERROR ']) {
Case 1:
The file size exceeds the server's space size
$this->seterror ("The file is too large (server).");
Break
Case 2:
The file size to upload exceeds the browser limit
$this->seterror ("The file is too large (form).");
Break
Case 3:
Files are only partially uploaded
$this->seterror ("The file was only partially uploaded.");
Break
Case 4:
No files found to upload
$this->seterror ("No file was uploaded.");
Break
Case 5:
Server temp folder is missing
$this->seterror ("The servers temporary folder is missing.");
Break ;
Case 6:
//File Write to Temp folder error
$this->seterror ("Failed to write to the temporary folder.");
Break ;
}
$_files Error (Note)