Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_FILES['files'])){
- foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){
- move_uploaded_file($tmp_name, "./img/{$_FILES['files']['name']['$key']}");
- }}
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title> File upload </title>
- </head>
- <body>
- <div>
- <form action="" method="post" enctype="multipart/form-data">
- <p>
- <input type="file" name="files[]" multiple="multiple" min="1" max="9999"/>
- <input type="submit" value="Upload" />
- </p>
- </div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement