Home > Backend Development > PHP Tutorial > Simple example analysis of php multiple file upload

Simple example analysis of php multiple file upload

WBOY
Release: 2016-07-25 08:58:44
Original
849 people have browsed it
  1. < ;/form>
Copy code

When you need to upload binary files, remember enctype="multipart/form-data"

  1. var_dump($_FILES);
  2. ?>
Copy code

Now $_FILES has only one index, which is

Copy the code

After submitting it to action.php, the internal structure of $_FILES will be like this:

$_FILES => array{ fileField1 =>array 'name' =>'****',   'type' => ..... .. }, fileField2 =>array 'name' =>'****',   'type' => ..... .. }, fileField3 =>array 'name' =>'****',   'type' => ..... .. }, fileField4 =>array 'name' =>'****',   'type' => ..... .. } fileField5 =>array 'name' =>'****',   'type' => ..... .. } }

The main thing is that the file upload information has been changed to a multi-dimensional array storage. Through looping, the relevant information in the file can be obtained like a single file upload.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template