Easy Tutorial
❮ Func Ftp Delete Func Curl_Multi_Remove_Handle ❯

PHP copy() Function



Definition and Usage

The copy() function copies a file.

The function returns TRUE on success and FALSE on failure.

Syntax

Parameter Description
file Required. Specifies the file to copy.
to_file Required. Specifies the destination for the copied file.

Tips and Notes

Note: If the target file already exists, it will be overwritten.


Example

The code above will output:


❮ Func Ftp Delete Func Curl_Multi_Remove_Handle ❯