title: Error in downloading file PHP
body: <p>I have a link which shows the filename to download.When a user clicks it,it needs to get downloaded.The file gets downloaded but it contains only 0 KB.In console it shows </p>
  
  <blockquote>
    <p>Resource interpreted as Document but transferred with MIME type application/force-download:       "../download.php?file=filename"</p>
  </blockquote>
  
  <p>My code is like this:</p>
  
  <pre><code>&lt;a href="download.php?file=user_uploads/'.$_path['uploads'].
  'logo_images/'.$row['FileName'].'" title="Click to download"&gt;'.$row['FileName'].'&lt;/a&gt;
  </code></pre>
  
  <p>The download.php is like this:</p>
  
  <pre><code>&lt;?php       
  $path   =   str_replace('/download.php?file=','',$_SERVER['REQUEST_URI']);  
  header("Content-Description: File Transfer");
  header("Content-Type: application/force-download"); 
  header("Content-Disposition: attachment; filename=\"" . basename($path . $uri[1]) . "\"" );   
  @readfile($path);  
  ?&gt; 
  </code></pre>
  
  <p>Thanks in advance.I have checked the path of the file also.   </p>