PHP copy() Function

The copy() function copies a file.

This function returns TRUE on success and FALSE on failure.

Example -

ParameterDescription
fileRequired. Specifies the file to copy
to_fileRequired. Specifies the file to copy to

Note -

If the destination file already exists, it will be overwritten.