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