Dunebook / codesource

0 stars 0 forks source link

how-to-upload-multiple-files-in-php/ #26

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

How to Upload Multiple Files in PHP

In this article, you will learn how to upload multiple files in PHP. In order to upload multiple files, you can use the move_uploaded_file()

https://codesource.io/how-to-upload-multiple-files-in-php/

ghost commented 2 years ago

Thank you for this example. Just one remark, you forgot to use the $path variable.

You wrote: // Upload file to $path move_uploaded_file($_FILES['file']['tmp_name'][$i], $file);

It should be: // Upload file to $path move_uploaded_file($_FILES['file']['tmp_name'][$i], $path.$file);