copy
copy($path,$new_path,$fail_if_exist=false); - this function is used to create a copy of the specified file
The function accepts parameters as input:
$path – path to the file to create a copy of (string). It can be either absolute or relative (relative to the script folder).
$new_path – path to create a copy of the specified file (string). It can be either absolute or relative (relative to the script folder).
$fail_if_exist – if is true, do not make a copy if the file already exists at the path specified for the copy. If false - the copy will replace the existing file
After testing, the function returns the result of its work to the script :
true – successfully made a copy (boolean)false – operation failed (boolean)