I have a question :
$sFileName = 'filen_name.csv';
header('Content-Encoding: UTF-8');
header("Content-Type:application/csv;charset=UTF-8");
header('Content-Disposition: attachement; filename="' . $sFileName . '";');
header("Pragma: no-cache");
header("Expires: 0");
echo "\xEF\xBB\xBF";
$output = fopen('php://output', 'w');
fputcsv($output, array('First','Second'), ";");
foreach ($aExport as $value) {
fputcsv($output, $value, ";");
}
fpassthru($output);
fclose($output);
exit;
return $this->redirect('route_name');
I want to redirect user after generation of .csv. Can you help me please ? Thx in advance and sorry for my english