PhpUploadFile.MoveTo Method

php Uploader

PHP File Uploader Class Reference

PhpUploadFile.MoveTo Method 

Moves the uploaded file to a new location.

  1. <?php   
  2. //Gets the GUID of the file based on uploader name   
  3. $fileguid=@$_POST["myuploader"];   
  4. if($fileguid)   
  5. {   
  6.     //get the uploaded file based on GUID   
  7.     $mvcfile=$uploader->GetUploadedFile($fileguid);   
  8.     if($mvcfile)   
  9.     {   
  10.         //Moves the uploaded file to a new location.   
  11.         $mvcfile->MoveTo("/uploads");   
  12.     }   
  13. }   
  14. ?>