I have two directories I am using, where I want to make a copy of the file in a different directory.
$dest = "/home/********/public_html/$userUName/SharedFiles/";
$source = "/home/********/public_html/$username/$value";
if(file_exists($dest))
{
//echo $source;
//echo $dest;
copy($source, $dest);
}
$source
and $dest
are definitely getting the right values required, but it's throwing an error
Warning: copy(/home/********/public_html/johnny/SharedFiles/) [function.copy]: failed to open stream: Is a directory in /home/********/public_html/MainHomescreen.php on line 380
which is the copy line.
Have been through many options to fix it by googling. Have checked file permissions, as far as I can see I've got everything in the right place, so have come to a dead end of where I've gone wrong!