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"); ?>