Home > Backend Development > PHP Tutorial > Solution to the problem of max_file_uploads limit on uploading multiple files in PHP

Solution to the problem of max_file_uploads limit on uploading multiple files in PHP

黄舟
Release: 2023-03-15 18:26:01
Original
4410 people have browsed it

In PHP programs, we often encounter this problem. When uploading attachments, many attachments, such as pictures, are successfully uploaded, but in fact only 20 attachments exist, or an error is reported and cannot be uploaded.

When editing the album in DEDECMS5.7, I found that as long as more than 20 pictures are saved, an error will occur. The prompt is as follows:

PHP Warning: Maximum number of allowable file uploads has been exceeded in Unknown on line 0
Copy after login

This is because

php There is max_file_uploads in php.ini for versions 5.2.12 and above: The default value is 20, which is:

max_file_uploads:20
Copy after login

The rough meaning is: a form can only upload up to 20 attachments, but why is the imperial picture collection Can I only upload 10 pictures?

This is because the Imperial Picture Collection has large pictures and thumbnails. There are 10 pictures, including 20 thumbnails.

Solution:

Modify the value of max_file_uploads:20 in php.ini to a larger value. For example:

max_file_uploads:10000
Copy after login

10000, this is enough, haha...

The above is the detailed content of Solution to the problem of max_file_uploads limit on uploading multiple files in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template