Advertisement
norberto1112

uploadfiles

Sep 27th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. $count = 0;
  3. if ($_SERVER['REQUEST_METHOD'] == 'POST'){
  4.     foreach ($_FILES['file']['name'] as $i => $name) {
  5.         if (strlen($_FILES['file']['name'][$i]) > 1) {
  6.             if (move_uploaded_file($_FILES['file']['tmp_name'][$i], 'upload/'.$name)) {
  7.                 $count++;
  8.             }
  9.         }
  10.     }
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement