This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// force download of CSV | |
// simulate file handle w/ php://output, direct to output (from http://www.php.net/manual/en/function.fputcsv.php#72428) | |
// (could alternately write to memory handle & read from stream, this seems more direct) | |
// headers from http://us3.php.net/manual/en/function.readfile.php | |
header('Content-Description: File Transfer'); | |
header('Content-Type: application/csv'); | |
header("Content-Disposition: attachment; filename=FILENAME.csv"); | |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |