Skip to content

Commit

Permalink
Merge pull request #18 from parsecsv/williamknauss-new-issue-14
Browse files Browse the repository at this point in the history
williamknauss new issue 14
  • Loading branch information
William Knauss committed Jun 3, 2014
2 parents c64a4bf + 90042a5 commit 0486a4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion parsecsv.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,12 @@ public function output ($filename = null, $data = array(), $fields = array(), $d

if ( $filename !== null ) {
header('Content-type: application/csv');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Length: '.strlen($data));
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
header('Content-Disposition: attachment; filename="'.$filename.'"; modification-date="'.date('r').'";');

echo $data;
}

Expand Down

0 comments on commit 0486a4b

Please sign in to comment.