Copy a file from source to destination. If unique == true, then if
the destination exists, it will be renamed by appending an increamenting
counting number.
public copyFile ( string $source, string $destination_dir, string $destination_file, boolean $unique = true ) : string | ||
$source | string | where the file is from, full path to the files required |
$destination_dir | string | where the files, just the destination dir, e.g., /www/html/gallery/ |
$destination_file | string | name of the new file, just the filename |
$unique | boolean | create unique destination file if true. |
return | string | the new copied filename, else error if anything goes bad. |