简体   繁体   English

允许的最大数量,php.ini 中没有 max_file_uploads

[英]Maximum number of allowable, no max_file_uploads in php.ini

I have a PHP which lets the user upload to a maximum of 20 files.我有一个 PHP 允许用户上传最多 20 个文件。 When I submit the pictures I am getting the following error in the error_log => PHP Warning: Maximum number of allowable file uploads has been exceeded in Unknown on line 0当我提交图片时,我在 error_log => PHP 中收到以下错误警告:在第 0 行的未知中已超过允许的文件上传的最大数量

When I created a phpinfo file under max_file_uploads I have 20 under Local Value and Master Value 'Configuration PHP Core'.当我在 max_file_uploads 下创建一个 phpinfo 文件时,我在本地值和主值“配置 PHP 核心”下有 20 个。

When I open the php.ini file I cannot find the max_file_uploads and when I insert the 'max_file_uploads = 50' the value in my php info file (above) remains the same ie 20.当我打开 php.ini 文件时,我找不到 max_file_uploads 并且当我插入“max_file_uploads = 50”时,我的 php 信息文件(上图)中的值保持不变,即 20。

What am I doing wrong please?请问我做错了什么?

UPDATE更新

I am on a shared host... I tried doing this ini_set('max_file_uploads', 50);我在共享主机上...我尝试这样做 ini_set('max_file_uploads', 50); but it didn't work.但它没有用。

The host told me that they cannot restart the server as 'on shared hosting, there is no way to reset/restart the server as that would effect hundreds of different accounts'主机告诉我,他们无法像“在共享主机上一样重新启动服务器,无法重置/重新启动服务器,因为这会影响数百个不同的帐户”

Detailed Description 详细说明

The default values for PHP will restrict you to a maximum 2 MB upload file size. PHP 的默认值将限制您上传文件的最大大小为 2 MB。 On the settings page for the upload module, Drupal calculates and displays the maximum file size that you can set based upon two PHP settings: 'post_max_size' and 'upload_max_filesize'.在上传模块的设置页面上,Drupal 根据两个 PHP 设置计算并显示您可以设置的最大文件大小:“post_max_size”和“upload_max_filesize”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM