Multiple file upload in php

前端 未结 14 1663
轮回少年
轮回少年 2020-11-21 11:32

I want to upload multiple files and store them in a folder and get the path and store it in the database... Any good example you looked for doing multiple file upload...

14条回答
  •  眼角桃花
    2020-11-21 12:20

    Simple is that, just count the files array first, then in while loop you can easily do this like

    $count = count($_FILES{'item_file']['name']);
    

    now you got total number of files right.

    In while loop do like this:

    $i = 0;
    while($i<$count)
    {
        Upload one by one like we do normally
        $i++;
    }
    

提交回复
热议问题