PHP Modify upload file Size Limit example detailed _php tips

Source: Internet
Author: User

1. Modify Max_execution_time

In PHP, the default page execution time is 30 seconds, more than 30 seconds, and the script stops executing.
This will cause you to be unable to open the page. Then we can modify the Max_execution_time
Look in the php.ini.

Max_execution_time

The default is 30 seconds.

Max_execution_time = 0

0 means no Limit

2. Modify Post_max_size

Post_max_size sets the maximum size allowed for POST data. This setting also affects file uploads.
The default post_max_size for PHP is 2M. If the POST data size is greater than post_max_size $_post and $_files superglobals will be empty.
Find Post_max_size instead

Post_max_size = 150M

3. Modify Upload_max_filesize

Upload_max_filesize represents the maximum size of the uploaded file.

Find Upload_max_filesize, default to 8M instead

Upload_max_filesize = 100M

In addition, Post_max_size is better than upload_max_filesize.

Thank you for reading, I hope to help you, thank you for your support for this site!

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.