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中根据W3C规范Unicode 2022-01-01
- 如何替换eregi() 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01