0

I'm learning PHP course.In that now I'm learning the file uploading concept.

<input type="file" multiple="multiple">

We can do the file uploading. But I had one doubt. Is there any restrictions here for uploading the different file types. Which means can we upload any file through the uploading or is there any restrictions here?

Charlie
  • 18,636
  • 7
  • 49
  • 75

2 Answers2

1

There are no restrictions in to the type of file you can upload. But you can set various limits regarding the file uploads in php.ini file.

These are examples

memory_limit = 32M
upload_max_filesize = 24M
post_max_size = 32M

Here is a useful article about these limits.

And here is your best reference about file uploading in PHP.

Charlie
  • 18,636
  • 7
  • 49
  • 75
-1

In HTML5 you can add the multiple attribute to select more than 1 file.You can upload any type of file provided in your php.ini file file_uploads = On

<form method="post" enctype="multipart/form-data">
            <input type="file" name="my_file[]" multiple>
            <input type="submit" value="Upload">
        </form>

Also to know more about enctype="multipart/form-data"

What does enctype='multipart/form-data' mean?

Community
  • 1
  • 1
art
  • 329
  • 1
  • 5
  • 21