Make a copy of a file: copy() function. : copy « File Directory « PHP






Make a copy of a file: copy() function.

 
Its syntax is: int copy (string source, string destination)

<?
    $data_file = "data.txt";
    copy($data_file, $data_file.'bak') or die("Could not copy $data_file");
?>
  
  








Related examples in the same category

1.Copying Files with copy( )
2.Copying a file
3.Copying files
4.Using the copy() Function