//ex6pro.php
<?
 if ($_FILES[upfile][name] != "")
 {
  echo $_FILES['upfile']['name']."<br/>";
  echo $_FILES['upfile']['size']."<br/>";
  echo $_FILES['upfile']['type']."<br/>";
  echo $_FILES['upfile']['tmp_name']."<br/>";
 }
 $file_path = "testimg/";
 $file_name = $file_path.$_FILES['upfile']['name'];
 if (copy($_FILES['upfile']['tmp_name'],$file_name))
 {
  echo "successful~";
  @unlink($_FILES['upfile']['tmp_name']);
 }
?>