Skip to content

Instantly share code, notes, and snippets.

View mlueckl's full-sized avatar
👾
Energetic!

Michael Lueckl mlueckl

👾
Energetic!
View GitHub Profile
$fileName = 'Billing-Summary.csv';
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-Description: File Transfer');
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename={$fileName}");
header("Expires: 0");
header("Pragma: public");
$fh = @fopen( 'php://output', 'w' );