Advertisement
Guest User

Untitled

a guest
Aug 30th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2.  
  3. if (isset($_FILES['files'])){
  4. foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){
  5. move_uploaded_file($tmp_name, "./img/{$_FILES['files']['name']['$key']}");
  6. }}
  7. ?>
  8.  
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  13. <title> File upload </title>
  14. </head>
  15. <body>
  16. <div>
  17. <form action="" method="post" enctype="multipart/form-data">
  18. <p>
  19. <input type="file" name="files[]" multiple="multiple" min="1" max="9999"/>
  20. <input type="submit" value="Upload" />
  21. </p>
  22. </div>
  23. </form>
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement