The copy() function copies a file.
This function returns TRUE on success and FALSE on failure.
Parameter | Description |
---|---|
file | Required. Specifies the file to copy |
to_file | Required. Specifies the file to copy to |
Note: If the destination file already exists, it will be overwritten.
The output of the code above will be: