PHP maximum limit for downloading files

Source: Internet
Author: User
The maximum size of PHP files to be uploaded is found in etcphp5apache2. ini file, modify the following: 1. max_execution_time is 30 seconds by default. if it is set to 0, there is no limit. this parameter is mainly used to set the longest execution time of the php page. for example, the default value is 30 seconds, indicating that the script will stop execution if the execution is not completed 30 seconds later. of course, if special processing is required, the maximum file upload limit in PHP is
Find the php. ini file in/etc/php5/apache2/and modify the following:
1. max_execution_time
The default value is 30 seconds. if it is set to 0, there is no limit. this parameter is mainly used to set the longest execution time of the php page. for example, the default value is 30 seconds, indicating that the script will stop execution if the execution is not completed 30 seconds later.
Of course, if special processing is required in special cases, call the method on the page:
Set_time_limit (max_time );


2. post_max_size
In php, this parameter is set to 2 M by default. if the size of POST data is greater than post_max_size, $ _ POST and $ _ FILES superglobals will be blank. this parameter also affects file upload.

3. upload_max_filesize
Many people have changed the parameters 1 and 2, but the maximum size of the file to be uploaded is still 8 M. because the default value of upload_max_filesize is 8 M, we should modify the value of this parameter.

In addition, post_max_size is better than upload_max_filesize.

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.