Copy a File

Used to a file

copy(source, target);

 

<?php
	$fileName = "/home/d/myFile.txt" ; //specify file name

	$copyName = "/home/d/copied.txt" ;

	copy($fileName, $copyName) ;
?>

*will overwrite existing target file

Leave a Reply