title: Download pdf file from php
body: <p>I'm trying to make a file that send a pdf file to the visitor.
  I have file: download.php</p>
  
  <p>and this is his content:</p>
  
  <pre><code>header('Content-disposition: attachment; filename='.$_GET['file']);
  header('Content-type: application/pdf');
  readfile($_GET['file']);
  </code></pre>
  
  <p>for some reason, the file sending an empty pdf file 183 bytes.</p>
  
  <p>any advice?</p>
  
  <p>thanks.</p>