mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-04-05 12:10:23 +00:00
数据库备份更新
This commit is contained in:
parent
926b21dcf4
commit
9d3ff2d2f6
6
vendor/tp5er/tp5-databackup/src/Backup.php
vendored
6
vendor/tp5er/tp5-databackup/src/Backup.php
vendored
@ -66,7 +66,7 @@ class Backup
|
||||
public function setTimeout($time=null)
|
||||
{
|
||||
if (!is_null($time)) {
|
||||
set_time_limit($time)||ini_set("max_execution_time", $time);
|
||||
set_time_limit($time)||ini_set("max_execution_time", $time);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
@ -118,7 +118,7 @@ class Backup
|
||||
if ($type) {
|
||||
$list = $db->query("SHOW FULL COLUMNS FROM {$table}");
|
||||
}else{
|
||||
$list = $db->query("show columns from {$table}");
|
||||
$list = $db->query("show columns from {$table}");
|
||||
}
|
||||
}
|
||||
return array_map('array_change_key_case', $list);
|
||||
@ -135,7 +135,7 @@ class Backup
|
||||
$glob = new \FilesystemIterator($path, $flag);
|
||||
$list = array();
|
||||
foreach ($glob as $name => $file) {
|
||||
$info['filename'] = $name;
|
||||
$info['filename'] = $name;//备份文件名称
|
||||
if (preg_match('/^\\d{8,8}-\\d{6,6}-\\d+\\.sql(?:\\.gz)?$/', $name)) {
|
||||
$name = sscanf($name, '%4s%2s%2s-%2s%2s%2s-%d');
|
||||
$date = "{$name[0]}-{$name[1]}-{$name[2]}";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user