title: Why file downloaded is 0 byte?
body: <p>I have this code triggered when user download mp3 file</p>
  
  <pre><code>$file = $_GET['file'];
  $ext = pathinfo($file, PATHINFO_EXTENSION);
  $match_array =array('pdf','mp3','mpa','ra','wav','wma','mid','m4a','m3u','iff','aif');
  if(in_array($ext,$match_array)){
    header("Content-type: application/".$ext);
    header("Content-Disposition: attachment; filename=". $file);
    readfile($file);
  }
  </code></pre>
  
  <p>but downloaded file is 0 byte so what is the problem ?</p>
  
  <p>File exists and <code>$file</code> contain this value</p>
  
  <p><code>https://mysite/upload/1/myfile.mp3</code></p>