backup list and backup download (.sql)
This commit is contained in:
35
_include/include_download_backup.php
Normal file
35
_include/include_download_backup.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
|
||||
# BACKUP DOWNLOAD
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
$backup = new backup();
|
||||
$backup->set_backup_data_by_id($this->get_id());
|
||||
|
||||
$filename = "\backup\/".$backup->get_bu_name() . "\.sql";
|
||||
|
||||
header('Content-Type: application/octet-stream');
|
||||
header("Content-Transfer-Encoding: Binary");
|
||||
//header("Content-disposition: attachment; filename='backup/".$backup->get_bu_name().".sql'");
|
||||
//header("Content-disposition: attachment; filename=\"backup/".$backup->get_bu_name().".sql\"");
|
||||
header("Content-disposition: attachment; filename=\"".$filename."\"");
|
||||
|
||||
//var_dump(is_file("backup/".$backup->get_bu_name() . ".sql"));
|
||||
|
||||
//header('Location: /admin/settings/3');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# NEM LEHET
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user