From 45c71886d79a4d522b9c61345f10fa089d8268df Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Fri, 18 Aug 2023 11:13:40 +0800 Subject: [PATCH] * Cannot request methods of base control. --- framework/router.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/framework/router.class.php b/framework/router.class.php index 697d2df5d6..994c4c50ff 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -692,4 +692,24 @@ class router extends baseRouter $this->rawParams = parent::mergeParams($defaultParams, $passedParams); return $this->rawParams; } + + /** + * 加载一个模块: + * + * Load a module. + * + * @access public + * @return bool|object if the module object of die. + */ + public function loadModule() + { + /* 不能直接请求基类的方法 Cannot call methods of base control class. */ + if(method_exists('Control', $this->methodName)) + { + echo 'Cannot call methods of base control class.'; + return false; + } + + return parent::loadModule(); + } }