title: Display pdf on website
body: <p>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.</p>
  
  <p>The code to display the pdf I use now:</p>
  
  <pre><code>$pdf = '/var/www/vhosts/domain.com/users/'.$_GET['file']; 
  header('Content-type: application/pdf');
  header('Content-Disposition: inline; filename="'.$pdf.'"'); 
  readfile($pdf);
  </code></pre>
  
  <p>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.</p>
  
  <p>Is there a better way to display the pdfs?</p>