Possible Duplicate:
Max file number can php upload at same time
I'm trying to upload multiple files using html and php
<input type="file" name="upload[]" accept="image/gif, image/jpeg, application/x-tar, application/x-zip-compressed" multiple="true">
in php when using
print count($_FILES['upload']);
I always get maximum 5 files even if I've selected 20 in html. What should I do to be able to upload, let's say, 20 files at a time?
You need to change these 2 parameters in php.ini file in order to allow this.
This will allow you to upload 20 files at the same time, and also increase the maximum allowance for the upload file size.
you may need to change in php.ini file and increase the limit of
max_file_uploads
(it mustbe 5 in your server now)Also make sure to make relevant changes to these parameters (if needed)
LevSahakyan solved the problem.
He was using
and because 'upload' is an array itself and has 5 parameters (name, type, tmp_name, error and size) it was uploading only 5 items. now he is using right parameter -