Selaa lähdekoodia

生成系统文件列表

tags/6.2.12
tianya 1 vuosi sitten
vanhempi
commit
a8fd41dca7
2 muutettua tiedostoa jossa 21 lisäystä ja 0 poistoa
  1. +20
    -0
      dedebiz
  2. +1
    -0
      src/data/admin/files.txt

+ 20
- 0
dedebiz Näytä tiedosto

@@ -505,6 +505,26 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) {
$query = "UPDATE `#@__member` SET $pwdm WHERE mid='$id'";
$dsql->ExecuteNoneQuery($query);
DedeCli::write("成功修改密码");
} else if(count($argv) > 1 && ($argv[1] =="make_filehash")){
$gitFiles = shell_exec('git ls-files');
// 将输出的字符串按行拆分成数组
$fileList = explode("\n", trim($gitFiles));
// 输出文件列表
$hashs = array();
foreach ($fileList as $file) {
if (!file_exists($file)) {
continue;
}
$name = $file;
$size = filesize($file);
$hash = md5_file($file);
$f = array(
"filename" => $name,
);
$hashs[] = $f;
}
file_put_contents(DEDEDATA.'/admin/files.txt',json_encode($hashs));
DedeCli::write("成功生成文件哈希");
} else {
DedeCli::write($helpStr);
}

+ 1
- 0
src/data/admin/files.txt
File diff suppressed because it is too large
Näytä tiedosto


Loading…
Peruuta
Tallenna