<?php
print_r($_FILES);

if (!empty($_FILES)) {
     
    $tempFile = $_FILES['file']['tmp_name'];          //3             
      
    $targetPath = dirname( __FILE__ )  . "/tmp";  //4
     
    $targetFile =  $targetPath. "/" .$_FILES['file']['name'];  //5

    echo $targetFile;
 
    move_uploaded_file($tempFile,$targetFile); //6
     
}

?>