PHP Ini_set post_max_size,upload_max_filesize

Source: Internet
Author: User
Transferred from: http://www.webzone8.com/article/80.html

Ini_set (' Max_execution_time ', ' 10 '); Ini_set (' Memory_limit ', ' 1024M '); echo ' Max_execution_time = '. Ini_get (' Max_execution_time '). "
"; echo ' Memory_limit = '. Ini_get (' Memory_limit '). "
"; echo ' post_max_size = '. Ini_get (' Post_max_size '). "
"; echo ' upload_max_filesize = '. Ini_get (' upload_max_filesize '). "
"; Ini_set (' Max_execution_time ', ' 10 '); Ini_set (' Memory_limit ', ' 1024M '); [Separator]

Note: Post_max_size,upload_max_filesize can not be modified with the following method.

Ini_set (' post_max_size ', ' 1024M '); Ini_set (' upload_max_filesize ', ' 1024M ');

The correct approach is to use the. htaccess file:

Php_value upload_max_filesize 50M php_value post_max_size 898M

Complementary points of knowledge:

In fact, in the PHP documentation, it is stated that the modifiable range of upload_max_filesize is php_ini_perdir.

Php_ini_perdir means that intra-domain directives can be modified in php.ini, httpd.conf, or. htaccess files.

Php_ini_system Intra-domain directives can be modified in php.ini and httpd.conf files, so upload_max_filesize with Int_set cannot be modified. Only the modifiable range is php_ini_all and can be modified with Int_set.


------------------------------


PHP upload files need to be configured:

Post_max_size

Upload_max_filesize

  • Related Article

    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.