mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
@@ -455,7 +455,10 @@ class Csv {
|
||||
$flat_string = $this->unparse($data, $fields, null, null, $delimiter);
|
||||
|
||||
if (!is_null($filename)) {
|
||||
header('Content-type: application/csv');
|
||||
$mime = $delimiter === "\t" ?
|
||||
'text/tab-separated-values' :
|
||||
'application/csv';
|
||||
header('Content-type: ' . $mime);
|
||||
header('Content-Length: ' . strlen($flat_string));
|
||||
header('Cache-Control: no-cache, must-revalidate');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
Reference in New Issue
Block a user