diff --git a/framework/base/control.class.php b/framework/base/control.class.php index e1d1bd2519..51e4e287e3 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -740,7 +740,7 @@ class baseControl */ if(!is_file($file2Included)) $this->app->triggerError("The control file $file2Included not found", __FILE__, __LINE__, $exit = true); chdir(dirname($file2Included)); - if($moduleName != $this->moduleName) helper::import($file2Included); + helper::import($file2Included); /** * 设置调用的类名。 diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 21525b08f2..0e7d1e18cd 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1631,7 +1631,7 @@ class baseRouter **/ $file2Included = $this->setActionExtFile() ? $this->extActionFile : $this->controlFile; chdir(dirname($file2Included)); - include $file2Included; + helper::import($file2Included); /* * 设置control的类名。 @@ -1650,7 +1650,7 @@ class baseRouter /* include default value for module*/ $defaultValueFiles = glob($this->getTmpRoot() . "defaultvalue/*.php"); - if($defaultValueFiles) foreach($defaultValueFiles as $file) include $file; + if($defaultValueFiles) foreach($defaultValueFiles as $file) helper::import($file); /* * 使用反射机制获取函数参数的默认值。