What are the main functions used for enabling file downloads in PHP?

To enable file downloads in PHP, you can use the `header()` function to set the appropriate content type and headers for the file download. You also need to use `readfile()` or `file_get_contents()` to read the file contents and output them to the browser. Additionally, you can use `exit()` to prevent any further output from being sent to the browser after the file download.

$file = 'path/to/file.pdf';

header('Content-Description: File Transfer');
header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Content-Length: ' . filesize($file));

readfile($file);
exit();