Rename() function for moving files : File Copy Move : File Directory PHP Source Code


PHP Source Code » File Directory » File Copy Move »

 

Rename() function for moving files




<?php
   $source = "./test.txt";
   $destination = "./copy.txt";
                 
   if (rename($source, $destination)) {
      echo "The file was moved successfully.""n";
   else {
      echo "The specified file could not be moved. Please try again.""n";
   }
?>


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» File Copy Move