進出口使用此PHP的ini_set和ini_get心不是工作的方式,我想
ini_set('post_max_size','40M');
echo ini_get('post_max_size');
,由於某種原因的post_max_size是呼應了8M(默認的),而不是40M。 是
進出口使用此PHP的ini_set和ini_get心不是工作的方式,我想
ini_set('post_max_size','40M');
echo ini_get('post_max_size');
,由於某種原因的post_max_size是呼應了8M(默認的),而不是40M。 是
post_max_size
在運行時不可設置。 PHP僅在文件上傳後才運行,直到upload_max_filesize
已被確定,您才能使用ini_set
。因此,您無法使用ini_set
來設置該原因的設置。
您必須直接從php.ini
設置此選項。
當@Sarfaz說php.ini它可以是你的apache虛擬主機配置(或.htaccess)與php_value或php_admin_value命令(你會看到與php_admin_value該設置不能在PHP腳本中更改) – regilero 2011-01-08 13:24:24
post_max_size是INI指令,只能改變PHP_INI_PERDIR,如上所述in the manual。
再次,from the manual:
PHP_INI_PERDIR:項可以在php.ini中 ,或的.htaccess httpd.conf中設置
由你hostin提供一些值可能會被鎖定,所以你不能改變他們全部。 – 2011-01-08 08:03:51