Update demo.php

This commit is contained in:
邹景立 2021-09-07 23:29:54 +08:00
parent e717a6b19a
commit 30433d8a53

View File

@ -15,10 +15,11 @@
// +----------------------------------------------------------------------
use think\admin\service\SystemService;
use think\App;
invoke(function (\think\App $app) {
invoke(function (App $app) {
/*! 非开发环境,清理限制文件 */
if (!SystemService::instance()->checkRunMode('dev')) {
if ($app->request->isGet() && !SystemService::instance()->checkRunMode()) {
@unlink("{$app->getBasePath()}admin/controller/api/Update.php");
@unlink("{$app->getBasePath()}admin/route/demo.php");
@rmdir("{$app->getBasePath()}admin/route");