public function copyFile($originalFile, $newFile)
    {
        if (is_file($originalFile)) {
            @copy($originalFile, $newFile) or die("File '{$originalFile}' can't be copied to '{$newFile}'.");
        } else {
            die("File '{$originalFile}' doesn't exist.");
        }
    }
public function copyFile($originalFile, $newFile)
    {
        if (is_file($originalFile)) {
            @copy($originalFile, $newFile) or die("File '{$originalFile}' can't be copied to '{$newFile}'.");
        } else {
            die("File '{$originalFile}' doesn't exist.");
        }
    }
public function copyFile ( $ originalFile , $ newFile ) { if ( is_file ( $ originalFile ) ) { @ copy ( $ originalFile , $ newFile ) or die ( "File '{$originalFile}' can't be copied to '{$newFile}'." ) ; } else { die ( "File '{$originalFile}' doesn't exist." ) ; } }
To copy a file

@param string $originalFile Original file to copy
@param string $newFile The copy of the original file
To copy a file