CodeIgniter Backup Database не работает

Я использую класс утилиты базы данных CodeIgniter Backup.
Но это дает мне ошибку

Неподдерживаемая функция используемой платформы базы данных.

Имя файла: E: \ xampp \ htdocs \ zafarsir \ system \ database \ drivers \ mysqli \ mysqli_utility.php

Номер строки: 82

Вот мой код

$this->load->dbutil();

// // Backup your entire database and assign it to a variable
$backup =& $this->dbutil->backup();// Load the file helper and write the file to your server
$this->load->helper('file');
write_file('http://localhost/zafarsir/database/mybackup.gz', $backup);

// Load the download helper and send the file to your desktop
$this->load->helper('download');
force_download('mybackup.gz', $backup);

$prefs = array(
'tables'      => array('user', 'party'),  // Array of tables to backup.
'ignore'      => array(),           // List of tables to omit from the backup
'format'      => 'txt',             // gzip, zip, txt
'filename'    => 'mybackup.sql',    // File name - NEEDED ONLY WITH ZIP FILES
'add_drop'    => TRUE,              // Whether to add DROP TABLE statements to backup file
'add_insert'  => TRUE,              // Whether to add INSERT data to backup file
'newline'     => "\n"               // Newline character used in backup file
);

$this->dbutil->backup($prefs);

Это дает мне ошибку в этой строке

$backup =& $this->dbutil->backup();

Я новичок в CodeIgniter, плз, помогите мне

1

Решение

function backup_Eventtable() {
$this->load->dbutil();
$prefs = array(
//'tables'      => array('hotel_accomodation'),  // Array of tables to backup.
'ignore'      => array(),           // List of tables to omit from the backup
'format'      => 'txt',             // gzip, zip, txt
'filename'    => ''.date("Y-m-d-H-i-s").'-mybackup.sql',    // File name - NEEDED ONLY WITH ZIP FILES
'add_drop'    => TRUE,              // Whether to add DROP TABLE statements to backup file
'add_insert'  => TRUE,              // Whether to add INSERT data to backup file
'newline'     => "\n"               // Newline character used in backup file
);

$backup =& $this->dbutil->backup($prefs);
//I tried it with and without the next 2 Lines.
$this->load->helper('file');
write_file('backup_db/'.date("Y-m-d-H-i-s").'-mybackup.sql', $backup);
}

попробуйте этот код, может быть полезно ….

0

Другие решения

Других решений пока нет …