[eluser]cinewbie81[/eluser]
Hi all, I'm new here..
I use CI build in library to do my database backup, and the code is as following:
$this->load->dbutil();
$prefs = array(
'ignore' => array('my_ignore_table'),
'format' => 'txt',
'add_drop' => FALSE,
'add_insert' => TRUE,
'newline' => "\n"
);
$backup =& $this->dbutil->backup($prefs);
$this->load->helper('download');
force_download('mybackup.sql', $backup);
The code aboe is working, but it will always backup the file and download it to my Desktop (through force_download function) .. But what i want now is to create a new folder each time i do a backup, and then download the backup file to the new created folder. Is that any way for me to do it ? Hope u guys can help, thanks in advance