I've a little problem. On my server i've several pdf files saved outside the public folder. I want to display those files on my website.
The code to display the pdf I use now:
$pdf = '/var/www/vhosts/domain.com/users/'.$_GET['file'];
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="'.$pdf.'"');
readfile($pdf);
What I do now is display them via an iFrame but on IE8 i'll get the message to save the file to my computer. On chrome and IE9 there are no problems.
Is there a better way to display the pdfs?