Copying a file : copy « File Directory « PHP
- PHP
- File Directory
- copy
Copying a file
<?php
$old = '/tmp/yesterday.txt';
$new = '/tmp/today.txt';
copy($old,$new) or die("couldn't copy $old to $new: $php_errormsg");
?>
Related examples in the same category