diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index 4abc8eb8f..f91d0e90b 100644 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -65,7 +65,7 @@ class Config extends Controller $this->fetch(); } else { if ($xpath = $this->request->post('xpath')) { - if (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]+$/', $xpath)) { + if (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $xpath)) { $this->error('后台入口名称需要是由英文字母开头!'); } if ($xpath !== 'admin' && file_exists($this->app->getBasePath() . $xpath)) { diff --git a/app/admin/view/config/system.html b/app/admin/view/config/system.html index acd0696ad..4f79deb8b 100644 --- a/app/admin/view/config/system.html +++ b/app/admin/view/config/system.html @@ -5,7 +5,7 @@ Login 名称由英文字母开头且不能存在相同名称的应用,设置之后原地址不能继续访问!