How can a PHP script be used to send a file to a user?
To send a file to a user using a PHP script, you can use the `header()` function to set the appropriate content type and disposition headers. Then, use `readfile()` function to output the file contents to the browser.
<?php
$file = 'example.pdf';
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="' . $file . '"');
readfile($file);
exit;
?>