diff --git a/base.php b/base.php index 969447d5c1..86c585bc35 100644 --- a/base.php +++ b/base.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -define('THINK_VERSION', '5.0.22'); +define('THINK_VERSION', '5.0.23'); define('THINK_START_TIME', microtime(true)); define('THINK_START_MEM', memory_get_usage()); define('EXT', '.php'); diff --git a/library/think/App.php b/library/think/App.php index 297f8ae5f3..f572b907c3 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -552,7 +552,7 @@ public static function module($result, $config, $convert = null) // 获取控制器名 $controller = strip_tags($result[1] ?: $config['default_controller']); - if (!preg_match('/^[A-Za-z](\w)*$/', $controller)) { + if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) { throw new HttpException(404, 'controller not exists:' . $controller); }