Use of the copy() function : File Copy Move : File Directory PHP Source Code


PHP Source Code » File Directory » File Copy Move »

 

Use of the copy() function



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


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» File Copy Move