可能的重复:
覆盖 upload_max_filesize https://stackoverflow.com/questions/949415/overriding-upload-max-filesize
我使用这些代码来更改上传文件大小:-
echo ini_get('upload_max_filesize').'<br/>';
ini_set("upload_max_filesize","300M");
echo ini_get("upload_max_filesize");
但我得到了
2M
2M
这是在 php.ini 中设置的。
我想更改文件上传大小限制。
- http://php.net/manual/en/ini.list.php http://php.net/manual/en/ini.list.php
upload_max_filesize“2M”PHP_INI_PERDIR
- http://php.net/manual/en/configuration.changes.modes.php http://php.net/manual/en/configuration.changes.modes.php
PHP_INI_PERDIR可以在 php.ini、.htaccess、httpd.conf 或 .user.ini 中设置条目(自 PHP 5.3 起)
所以你不能使用ini_set
为了这。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)