$_files Error (Note)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.