I run php4.3.4 on redhad linux.I test a small code.I want to copy a file from $src to $dst.
it is here:
<?php
$src="/www/tmp/exit_card.php";
$dst="uploads/abc.php";
//
if (file_exists($src)) {
print "The file exists<p>";
}else {
print "The file does not exist<p>";
}
//
if (!copy($src, $dst)) {
echo $src, ' could not be copied to ', $dst;
}else{
echo "ok";
}
?>
I get error like this:
The file exists
Warning: copy(uploads/abc.php): failed to open stream: Permission denied in /www/comments/test_move.php on line 11
/www/tmp/exit_card.php could not be copied to uploads/abc.php
I do not not which permission need for both folder.Please help me.
Thanks a lot .