PHP框架:CodeIgniter框架备份数据库
- php语言
- 关注:7.55K次
每一练习都是一次积淀,最终我们会成就不一样的自己。下面是小编整理的CodeIgniter框架备份数据库,希望对大家学习PHP有用,更多消息请关注应届毕业生网。 导出txt格式: // Load the DB utility class $this->load->dbutil(); // Backup your entire database and assign it to a variable $backup=&$this->dbutil->backup(array('format'=>'txt')); // Load the file helper and write the file to your server $this->load->helper('file'); write_file('',$backup); gzip格式: // Load the DB utility class $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('',$backup); zip格式 // Load the DB utility class $this->load->dbutil(); // Backup your entire database and assign it to a variable $backup=&$this->dbutil->backup(array('format'=>'zip')); // Load the file helper and write the file to your server $this->load->helper('file'); write_file('',$backup);
- 文章版权属于文章作者所有,转载请注明 https://xuezhezhai.com/jsj/php/xdg3r6.html