title: All Mp3 Files downloaded with 3kb only and corrupt
body: <p>This code force downloads fine for me on both Chrome and Mozilla. But the issue is that all file size are 3kb. Why? The sizes are different like 3MB, 4MB, 3.5MB and the download file is just a corrupt 3kb... Kindly help please.</p>
  
  <p><strong>Note:</strong> If a use a header redirection, it downloads fine in Chrome or opens in other browsers and start playing without downloading.</p>
  
  <pre><code>&lt;?php
      //Bring in My functions
      require_once ('../inc/functions.php');
      //Bring in my header
      require_once ('../inc/header.php');
  ?&gt;
  &lt;!-- Page body starts --&gt;
      &lt;div class="container"&gt;
          &lt;div class="col-md-9 contentArea"&gt;      
  &lt;?php
  //Get File, Check For Existence and Download
  //Get File, Check For Existence and Download
          if(isset($_GET['file'])){
              $file = sanitizeMySQL($con, $_GET['file']);
              $checkFile = "SELECT * FROM files WHERE f_song = '$file' AND f_del='0'";
              $checkFileRun = mysqli_query($con, $checkFile);
              $fileName = mysqli_fetch_assoc($checkFileRun);
              //$song = $fileName['f_song'];
              if($fileName['f_song']==null || $fileName['f_song'] == ""){
                  echo '&lt;h4 class="text-center"&gt;&lt;i class="fa fa-times-circle fa-3x red"&gt;&lt;/i&gt;&lt;br /&gt;Sorry! This is does not Exist on this Server or has been moved&lt;/h4&gt;';
              }else{
                  $updateDownload = "UPDATE b_files SET f_count={$fileName['f_count']}+1 WHERE f_song ='$file' AND f_del='0'";
                  $updateDownloadRun = mysqli_query($con, $updateDownload);
                  $filePath = SITE_URL."music/".$file;
                  $fileSize = filesize($filePath);
                  header("Cache-Control: public");
                  header("Content-Description: File Transfer");
                  header("Content-Length: ".$fileSize);
                  header("Content-Disposition: attachment; filename=".$file);
                  header("Content-Type: audio/mpeg, audio/x-mpeg, audio/x-mpeg-3, audio/mpeg3");
                  header("Content-Transfer-Encoding: binary");
                  //Read the file
                  readfile($filePath);        
                  //header("Location:".SITE_URL.'music/'.urldecode($fileName['file_song_name']));
                  exit();
              }
          }elseif(!isset($_GET['file'])){
              echo '&lt;h4 class="text-center"&gt;&lt;i class="fa fa-times-circle fa-3x red"&gt;&lt;/i&gt;&lt;br /&gt;Sorry! File Not Found&lt;/h4&gt;';
          }
  //File Download Ends
          ?&gt;
          &lt;/div&gt;
          &lt;!-- Call In The SideBar --&gt;
          &lt;?php require_once '../inc/sidebar.php'; ?&gt;
      &lt;/div&gt;
  
  &lt;?php
      require_once ('../inc/footer.php');
  ?&gt;
  </code></pre>