What are the implications of using Content-Transfer-Encoding in PHP headers for file downloads?

When using Content-Transfer-Encoding in PHP headers for file downloads, it can lead to issues with the downloaded file being corrupted or not opening correctly. To solve this issue, it's recommended to remove the Content-Transfer-Encoding header from the PHP code when sending file downloads.

<?php
$file = 'example.pdf';

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

readfile($file);
exit;
?>