copy

copy — 拷贝文件

$file = ‘example.txt’;
$newfile = ‘example.txt.bak’;

if (!copy($file, $newfile)) {
echo “failed to copy $file…\n”;
}