Monday, 15 June 2015

php - Maximum number of files being uploaded by input type file -



php - Maximum number of files being uploaded by input type file -

possible duplicate: max file number can php upload @ same time

i'm trying upload multiple files using html , 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 maximum 5 files if i've selected 20 in html. should able upload, let's say, 20 files @ time?

you may need alter in php.ini file , increment limit of max_file_uploads (it mustbe 5 in server now)

also create sure create relevant changes these parameters (if needed)

upload_max_filesize post_max_size max_input_time max_execution_time

levsahakyan solved problem.

he using

for($i=0; $i<count($_files['upload']); $i++)

and because 'upload' array , has 5 parameters (name, type, tmp_name, error , size) uploading 5 items. using right parameter -

for($i=0; $i<count($_files['upload']['name']); $i++)

php html file-upload types input

No comments:

Post a Comment