一些优化提示

This commit is contained in:
icret
2022-01-17 16:39:59 +08:00
parent 8f5f0757cc
commit e110392b6d
4 changed files with 28 additions and 13 deletions

View File

@@ -42,4 +42,15 @@ if (isset($_POST['del_install'])) {
}
}
// 删除多余文件
if (isset($_POST['del_extra_files'])) {
if ($_POST['del_extra_files'] == "del") {
@unlink(APP_ROOT . '/CODE_OF_CONDUCT.md');
@unlink(APP_ROOT . '/LICENSE');
@unlink(APP_ROOT . '/README.md');
@unlink(APP_ROOT . '/config/EasyIamge.lock');
@deldir(APP_ROOT . "/.github/");
}
}
//exit(header("Location:/../application/login.php")); // 跳转主页

View File

@@ -108,7 +108,8 @@ function checkPASS($name)
$checkres = array($phpEnv, $fileinfo, $gd, $i_wjj, $file_php);
if (in_array(false, $checkres)) {
echo '<a href="./index.php" ><button class="btn btn-lg btn-danger" type="button">请满足上述要求后点击刷新</button></a>';
echo '<p class="text-danger">如果你的PHP版本较低或者不想安装上述PHP扩展请删除<code>install</code>目录</p>
<a href="./index.php" ><button class="btn btn-lg btn-danger" type="button">请满足上述要求后点击刷新</button></a>';
} else {
echo '
<form action="install.php" method="post">

View File

@@ -83,6 +83,9 @@ if ($state !== 'checked') {
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="del_extra_files" value="del" checked><span style="font-weight: bold;color:green;" title="删除Github/Gitee下载的多余文件">删除多余文件</span>
</label>
<label>
<input type="checkbox" name="del_install" value="del"><span style="font-weight: bold;color:red;">删除安装目录</span>
</label>