About the size of the downstream file,

Source: Internet
Author: User
For more information about the size of uploaded files! When the size of the uploaded file is larger than the value limited by the upload_max_filesize option in php. ini, will the program not run? In php. ini, the value of upload_max_filesize is set to 2 MB, and the size of the uploaded file cannot be greater than 2 MB. submit a form to ask about the size of the uploaded file!
When the size of the uploaded file is larger than the value limited by the upload_max_filesize option in php. ini, will the program not run?

The value of upload_max_filesize I set in php. ini is 2 M,

The size of the uploaded file cannot be greater than 2 MB,

After the form is submitted, the file size is determined in the background. if the size is greater than 2 MB, an error is Prompted. otherwise, no error is prompted.

However, when uploading a file, I directly uploaded a 3 M file, and the program did not respond,

What is the reaction of the program when the size of the uploaded file is larger than the value of upload_max_filesize in php. ini?

How can I get this error and prompt the user?

------ Solution --------------------
Didn't you say you gave a judgment?
In addition, it cannot exceed the size of post_max_size. Generally, upload_max_filesize <= post_max_size
------ Solution --------------------
Determine the size of the uploaded FILE, $ _ FILE ['name'] ['size']
------ Solution --------------------
2 MB = 2097152B
------ Solution --------------------
Give it a try and explain the result.

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.