我在https://makitweb.com/multiple-files-upload-at-once-with-php/网站上找到了这段代码
由于某些原因,$ countfiles最多可计数20个,并且无论大小如何都可以上传20个文件。 如果我更改$ countfiles = 50;只是为了测试,它停止工作。
$countfiles = count($_FILES['file']['name']);
即使在它显示的站点上进行DEMO,(选择文件24个文件) 按上传显示20个项目。
答案 0 :(得分:0)
有关file uploads的信息,请参阅PHP文档。
增加max_file_uploads
默认情况下,您会看到此
; Maximum number of files that can be uploaded via a single request
max_file_uploads=20
您还可以更新这些值,
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
; Must be greater than or equal to upload_max_filesize
post_max_size = 40M