Are there any best practices for opening files in new windows using PHP?

When opening files in new windows using PHP, it is recommended to use the `header()` function to set the `Content-Disposition` header to `attachment`. This will prompt the browser to download the file instead of displaying it in the current window.

<?php
$file = 'path/to/your/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;
?>