Daily Archives: June 7, 2012



For downloading csv files using php. <?php   header("Pragma: public");   header("Expires: 0");   header("Cache-Control: must-revalidate, post-check=0, pre-check=0");   header("Cache-Control: private",false);   header("Content-Type: application/csv");   header("Content-Disposition: attachment; filename=\"output.csv\";" );  readfile("path to output.csv");   ?>

Download as CSV – PHP