[eluser]coding_hero[/eluser]
Hi, everyone!
Here's my code:
Code:
$filename = "database_backup_" . date("dMY-Gi");
$prefs ['format'] = 'gzip';
$prefs ['filename'] = $filename . ".sql";
$this->load->dbutil();
$this->load->helper('download');
$dbbackup =& $this->dbutil->backup($prefs);
force_download ($filename . ".gz", $dbbackup);
It all works fine, and works like it is supposed to, with the exception of the filename when the .gz file is unzipped. I wanted it to force download on a '.gz' file, and when it's opened, inside would be a '.sql' file. Instead, the file has no extension (the filename is just whatever is set by $filename). Am I misunderstanding what the $prefs['filename'] sets?
Thanks for any help!