SQL 备份
本帖最后由 z445619791 于 2010-1-27 16:29 编辑// 加载数据库工具类
$this->load->dbutil();
// 备份整个数据库并将其赋值给一个变量
$backup =& $this->dbutil->backup();
// 加载文件辅助函数并将文件写入你的服务器
$this->load->helper('file');
write_file('/path/to/mybackup.gz', $backup);
// 加载下载辅助函数并将文件发送到你的桌面
$this->load->helper('download');
force_download('mybackup.gz', $backup);
我按照他这样备份数据库 为什么只有页面上输出乱码 数据库没备份的
$this->load->helper('file');
$data = 'Some file data';
if ( ! write_file('./path/to/file.php', $data)){
echo 'Unable to write the file';
}else{
echo 'File written!';
}
这段代码不能写入文件
文件夹的只读属性改了还是只读的 改不过来attrib -r -s d:\www这个命令也是改不了 郁闷
高手解决下 谢谢
解决 到底解决没解决? :lol
哦 自己解决了
多谢斑竹关心:victory: :kiss: :handshake
页:
[1]