public function copyFile( $sourcePath, $destPath )
{
if ( file_exists($sourcePath) && is_file($sourcePath) )
{
copy($sourcePath, $destPath);
chmod($destPath, 0666);
return true;
}
return false;
}
If you copy and file to site root / it breaks the entire site with a Permission Denied
Perhaps 755 would be better or a check for if copying to / then 755?