Multi file upload with PHP/Javascript and no flash

前端 未结 4 851
傲寒
傲寒 2021-02-10 14:27

I\'m trying to make a webpage that allows the uploading of multiple files at the same times. I will limit the file extensions to the most common images like JPG, JPEG, PNG and G

4条回答
  •  清歌不尽
    2021-02-10 15:14

    You can keep adding 'file' inputs but use a name of something like 'upload[]'

    
    

    Then in $_FILES['upload'] you will have an array of files you can loop over like

    foreach ($_FILES['upload'] as $file) {
        echo $file['size'];
    }
    

提交回复
热议问题