title: force download excel file not working on web server
body: <p>This following coding working on localhost perfectly for force to download excel file, but doesn't working on web server.</p>
  
  <pre><code>$par_name="worker_report";
  $nwdatetime=date('d-m-Y h-i-s');
  $fi = $par_name."_". $nwdatetime;
  $extns=".xls";
  header('Content-Type: application/force-download');  
  header('Content-disposition: attachment; filename='.$fi.$extns);  
  
  header("Pragma: ");  
  header("Cache-Control: ");  
  $_REQUEST['datatodisplay'];  
  </code></pre>