What is the recommended way to copy files from one directory to another using PHP?

To copy files from one directory to another using PHP, you can use the `copy()` function provided by PHP. This function takes two parameters: the source file path and the destination file path. It will create a copy of the file in the specified destination directory.

$source = '/path/to/source/file.txt';
$destination = '/path/to/destination/file.txt';

if (copy($source, $destination)) {
    echo "File copied successfully.";
} else {
    echo "Failed to copy file.";
}