更新
This commit is contained in:
@@ -27,7 +27,7 @@ class Database extends Admin {
|
||||
/* 数据还原 */
|
||||
case 'import':
|
||||
//列出备份文件列表
|
||||
$path = config('data_backup_path');
|
||||
$path = \think\facade\Cache::get('system_config_data.data_backup_path');
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0755, true);
|
||||
}
|
||||
@@ -63,8 +63,7 @@ class Database extends Admin {
|
||||
break;
|
||||
/* 数据备份 */
|
||||
case 'export':
|
||||
$Db = \think\Db::connect();
|
||||
$list = $Db->query('SHOW TABLE STATUS');
|
||||
$list = \think\facade\Db::query('SHOW TABLE STATUS');
|
||||
$list = array_map('array_change_key_case', $list);
|
||||
$title = '数据备份';
|
||||
break;
|
||||
@@ -72,8 +71,9 @@ class Database extends Admin {
|
||||
return $this->error('参数错误!');
|
||||
}
|
||||
//渲染模板
|
||||
$this->setMeta($title);
|
||||
$this->assign('list', $list);
|
||||
$this->data = [
|
||||
'list' => $list
|
||||
];
|
||||
return $this->fetch($type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user