How to use copy() function to make a copy of a file from source to destination in PHP

1 Answer

0 votes
$file = 'c:/xampp/htdocs/knowrex.com/test-file.php';
$copyfile = 'c:/xampp/htdocs/workingframe.com/test-file.php';
   
if (!copy($file, $copyfile)) 
    echo "copy error <br />";
else 
    echo "copy success <br />";

/*
run:

copy success 
 
*/

 



answered Apr 17, 2016 by avibootz

Related questions

...