if(isset($_REQUEST['downloadCsv']) && $_REQUEST['downloadCsv'] !=""){ ob_clean(); $filename = "myFile.csv"; header('Content-type: application/csv'); header('Content-Disposition: attachment; filename='.$filename); echo $output; exit; }
Some help on php code
if(isset($_REQUEST['downloadCsv']) && $_REQUEST['downloadCsv'] !=""){ ob_clean(); $filename = "myFile.csv"; header('Content-type: application/csv'); header('Content-Disposition: attachment; filename='.$filename); echo $output; exit; }