Compare commits

...

1 Commits

Author SHA1 Message Date
Grisu
2e77ac243b added compression for download and ensure utf-8 encoding 2022-12-04 23:04:29 +01:00

View File

@@ -9,7 +9,8 @@
$table = $_GET['table']; $table = $_GET['table'];
} }
header('Content-type: text/csv'); ob_start('ob_gzhandler'); #compressing data which is sent to the browser, the browser will decompress the data automatically
header('Content-type: text/csv; charset="UTF-8" ');
header('Content-Disposition: attachment; filename="table.csv" '); header('Content-Disposition: attachment; filename="table.csv" ');
function download_table($stmt) { function download_table($stmt) {