PHP failed copy
Submitted by robind99 on Tue, 09/09/2014 - 16:09
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?
Forums:
ehcpdeveloper
Tue, 09/09/2014 - 21:09
Permalink
yes. it is permission problem
yes. it is permission problem.
the new file or directory should be php-writable.