kopia lustrzana https://github.com/to3k/twittodon
Add files via upload
rodzic
c0553bdcd3
commit
042377d0d5
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
$filename = 'Twittodon_com_db.csv';
|
||||
$export_data = unserialize($_POST['export_data']);
|
||||
|
||||
// file creation
|
||||
$file = fopen($filename,"w");
|
||||
|
||||
foreach ($export_data as $line){
|
||||
fputcsv($file,$line);
|
||||
}
|
||||
|
||||
fclose($file);
|
||||
|
||||
// download
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Disposition: attachment; filename=".$filename);
|
||||
header("Content-Type: application/csv; ");
|
||||
|
||||
readfile($filename);
|
||||
|
||||
// deleting file
|
||||
unlink($filename);
|
||||
exit();
|
||||
?>
|
Ładowanie…
Reference in New Issue