php 如何更改 max_file_uploads?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14065422/
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
how can i change max_file_uploads?
提问by user1933652
Possible Duplicate:
PHP see only 20 uploading files at a time
可能重复:
PHP 一次只能看到 20 个上传文件
I tried changing it in php.inidevelopment and production. but still I am unable to upload files more than 20 at the same time. I have checked current setting using phpinfo();but still showing max_file_uploadsis 20not showing changed value in php.ini.
我尝试在php.ini开发和生产中更改它。但我仍然无法同时上传 20 个以上的文件。我已经检查使用当前设置phpinfo();,但仍表现出max_file_uploads的20不显示更改后的值php.ini。
回答by Mevin Babu
You have to change the values in php.inifile.Your php.inifile is in xampp\php\php.ini
您必须更改php.ini文件中的值。您的php.ini文件位于xampp\php\php.ini
You have to change both these values to be able to upload bigger files,
您必须更改这两个值才能上传更大的文件,
Example to change it into 100Mb set :
将其更改为 100Mb 集的示例:
upload_max_filesize = 100M
post_max_size = 100M
Note: After you edit your php.inifile restart xampp or apache server to see the difference.
注意:编辑php.ini文件后重新启动 xampp 或 apache 服务器以查看差异。
回答by Suresh Kamrushi
You can set it with init_set() in your php file-
您可以在 php 文件中使用 init_set() 设置它-
ini_set('max_file_uploads', 50);
OR you can try with .htaccess file. Put below line in your htaccess file.
或者您可以尝试使用 .htaccess 文件。将以下行放在您的 htaccess 文件中。
php_value upload_max_filesize 10M

