Max file number can php upload at same time

前端 未结 4 2212
南旧
南旧 2020-11-29 10:12

I am using the tag for uploading multiple files with php. I notice that if i choose more than 20 files php uploads only the first 20 files.Is there a way to expand this lim

相关标签:
4条回答
  • 2020-11-29 10:37

    The size of total upload is limited and not the number of files. You can change the total size by editing this line in php.ini:

       post_max_size = 256M
    

    Or more. So, if you want to upload 50 files, each of 100 MB, then you should set this limit more than 5000 MB.

    0 讨论(0)
  • 2020-11-29 10:41

    see upload_max_filesize in php.ini

    0 讨论(0)
  • 2020-11-29 10:46

    I think that is not 20 limit fault, but php config post_max_size and upload_max_filesize or bad handling of your upload form. Can you show us a sample source of your form and handling ?

    0 讨论(0)
  • 2020-11-29 10:53

    This limit was added in PHP 5.3.1, to avoid a type of DOS attack: temporary files exhaustion.

    Added "max_file_uploads" INI directive, which can be set to limit the number of file uploads per-request to 20 by default, to prevent possible DOS via temporary file exhaustion. (Ilia)

    (changelog for PHP 5.3.1)

    You can increase this limit by changing the max_file_uploads directive.

    0 讨论(0)
提交回复
热议问题