When creating and downloading a CSV from a database call using: putcsv, header and php outstream (php://output).
// Output headers
header("Content-Type: text/csv; charset=utf8");
header("Content-Disposition: attachment; filename=" . $_REQUEST['filename']);
// Create a file pointer to the output stream
$output = fopen('php://output', 'w');
// Output the column headings
fputcsv($output, $columnNames);
// For each data row add new row to csv file
foreach($data as $dta)
{
fputcsv($output, $dta);
}
When the a user downloads the csv a minute later their chrome completely crashes and shuts down. The CSV downloaded is only 676KB.
Thanks in advance for any help.