Browse Source

Update api.php

tags/6.2.2
tianya 1 year ago
parent
commit
735b097d54
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/admin/api.php

+ 5
- 5
src/admin/api.php View File

@@ -275,14 +275,14 @@ if ($action === 'is_need_check_code') {
$f->filename = preg_replace('/^\/admin/', $curDir, $f->filename); $f->filename = preg_replace('/^\/admin/', $curDir, $f->filename);
$srcFile = $backupVerPath.$f->filename; $srcFile = $backupVerPath.$f->filename;
$dstFile = str_replace(array("\\", "//"), '/', DEDEROOT.$f->filename); $dstFile = str_replace(array("\\", "//"), '/', DEDEROOT.$f->filename);
var_dump_cli('files','srcFile',$srcFile,'dstFile',$dstFile);
// $rs = @copy($srcFile, $dstFile);
// if($rs) {
// unlink($srcFile);
// }
$rs = @copy($srcFile, $dstFile);
if($rs) {
unlink($srcFile);
}
} }
$row[$k]->ispatched = true; $row[$k]->ispatched = true;
SetCache('update', 'vers', $row); SetCache('update', 'vers', $row);
RmRecurse($backupVerPath);
echo json_encode(array( echo json_encode(array(
"code" => 0, "code" => 0,
"msg" => "正在应用{$ver->ver}的版本补丁文件", "msg" => "正在应用{$ver->ver}的版本补丁文件",


Loading…
Cancel
Save