Multiple file upload in php

前端 未结 14 1635
轮回少年
轮回少年 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:17

    Here is a function I wrote which returns a more understandable $_FILES array.

    function getMultiple_FILES() {
        $_FILE = array();
        foreach($_FILES as $name => $file) {
            foreach($file as $property => $keys) {
                foreach($keys as $key => $value) {
                    $_FILE[$name][$key][$property] = $value;
                }
            }
        }
        return $_FILE;
    }
    

提交回复
热议问题