如何移动上传的文件

I have an HTML web form where users can upload multiple files. I am having trouble with moving the files though.

HTML:

My HTML:

<form enctype="multipart/form-data" method="post" action="save.php">
    <input type="hidden" name="MAX_FILE_SIZE" value="500000"/>
    <input type="file" name="uploads[]" multiple="multiple" />
    <input type="submit" name="submit" value="submit"/>
 </form>

Save.php:

 <?php
     foreach ($_FILES['uploads']['name'] as $file) {
     $target= UPLOADPATH . $file;
     move_uploaded_file($file, $target)
     or die('error with moving the file');
      $file= time() . $_FILES['uploads']['name'];
         echo $file;
     }

The problem is with move_uploaded_file(). What could I be doing wrong?

Try as below, you need to pass first parameter as file source

foreach ($_FILES['uploads']['name'] as $key => $file) {
 $target= UPLOADPATH . $file;

 move_uploaded_file($_FILES['uploads']['tmp_name'][$key], $target)
 or die('error with moving the file');
  $file= time() . $_FILES['uploads']['name'];
     echo $file;
 }