This commit is contained in:
thinkphp
2016-02-17 22:19:07 +08:00
parent e3c2f42122
commit 46d81a2575
2 changed files with 56 additions and 52 deletions

View File

@@ -215,11 +215,11 @@ class App
// 获取控制器名
$controllerName = strip_tags($result[1] ?: Config::get('default_controller'));
define('CONTROLLER_NAME', $config['url_controller_convert'] ? strtolower($controllerName) : $controllerName);
define('CONTROLLER_NAME', Config::get('url_controller_convert') ? strtolower($controllerName) : $controllerName);
// 获取操作名
$actionName = strip_tags($result[2] ?: Config::get('default_action'));
define('ACTION_NAME', $config['url_action_convert'] ? strtolower($actionName) : $actionName);
define('ACTION_NAME', Config::get('url_action_convert') ? strtolower($actionName) : $actionName);
// 执行操作
if (!preg_match('/^[A-Za-z](\/|\.|\w)*$/', CONTROLLER_NAME)) {