How can PHP be used to automate the process of copying files from a client to a server?

To automate the process of copying files from a client to a server using PHP, you can use the `copy()` function provided by PHP. This function allows you to copy a file from a source location to a destination location. By specifying the source file path and the destination file path, you can easily transfer files from a client to a server.

<?php
$sourceFile = 'client_folder/file.txt';
$destinationFile = 'server_folder/file.txt';

if (copy($sourceFile, $destinationFile)) {
    echo "File copied successfully!";
} else {
    echo "Error copying file.";
}
?>