PHP failed copy

I try to copy a file but it says:

-------------------------
failed to copy example.txt...
-------------------------

code:
-------------------------
<?php

$file = 'example.txt';
$newfile = 'example.txt.bak';

if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}

?>
-------------------------

is't the permissions?

yes. it is permission problem.
the new file or directory should be php-writable.