ini_set(quot;upload_max_filesizequot;,quot;200Mquot;) not working in php(ini_set(upload_max_filesize,200M) 在 php 中不起作用)
问题描述
<块引用>可能的重复:
覆盖upload_max_filesize
我使用这些代码来更改上传文件大小:-
echo ini_get('upload_max_filesize').'
';ini_set("upload_max_filesize","300M");echo ini_get("upload_max_filesize");
但是我得到了
2M2M
在 php.ini 中设置.
我想更改文件上传大小限制.
- http://php.net/manual/en/ini.list.php莉>
<块引用>
upload_max_filesize "2M" PHP_INI_PERDIR
- http://php.net/manual/en/configuration.changes.modes.php一个>
<块引用>
PHP_INI_PERDIR 可以在 php.ini、.htaccess、httpd.conf 或 .user.ini 中设置条目(自 PHP 5.3 起)
因此您不能为此使用 ini_set
.
Possible Duplicate:
overriding upload_max_filesize
i use these code for change upload file size :-
echo ini_get('upload_max_filesize').'<br/>';
ini_set("upload_max_filesize","300M");
echo ini_get("upload_max_filesize");
BUT I GOT
2M
2M
which is set in php.ini.
i want to change file upload size limit.
- http://php.net/manual/en/ini.list.php
upload_max_filesize "2M" PHP_INI_PERDIR
- http://php.net/manual/en/configuration.changes.modes.php
PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)
So you can't use ini_set
for this.
这篇关于ini_set("upload_max_filesize","200M") 在 php 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ini_set("upload_max_filesize","200M") 在


- PHP Count 布尔数组中真值的数量 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- Laravel 仓库 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01