<?php   
$filename = "Reporte.csv";

if(file_exists($filename)){

header("Content-Description: File Transfer");

header("Content-Type: text/csv");

header("Content-Disposition: attachment; filename=".basename($filename));

header("Content-Transfer-Encoding: Binary");

header("Expires:0");

header("Cache-control:must-revalidate");

header("Pragma:public");

header("Content-Length".filesize($filename));

ob_clean();

flush();

readfile($filename);

exit;

}
?>
