php 已超出允许的最大文件上传数量
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4438551/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maximum number of allowable file uploads has been exceeded
提问by HyderA
We're uploading about 500 images at a time
我们一次上传大约 500 张图片
max_file_uploads = 600
memory_limit = 200M ( most images are 12-15KB )
post_max_size = 200M
Why are we still getting that warning?
为什么我们仍然收到那个警告?
EDIT: All these variables are set in the php.ini file and confirmed by checking using phpinfo();
编辑:所有这些变量都在 php.ini 文件中设置,并通过使用 phpinfo() 进行检查来确认;
采纳答案by álvaro González
The PHP script won't even start executing until all the files have been uploaded. That means that you cannot change the max_file_uploads
directive from within PHP, e.g. with ini_set()
: you need to do it in the php.ini
file. Otherwise, when you change the setting the limit has already been hit.
PHP 脚本在所有文件都上传之前甚至不会开始执行。这意味着您不能max_file_uploads
从 PHP 内部更改指令,例如ini_set()
:您需要在php.ini
文件中进行更改。否则,当您更改设置时,已达到限制。
回答by Shakti Singh
add max_file_uploads=500 to php.ini