* Adjust response of api.

This commit is contained in:
zhujinyong
2021-09-08 10:40:25 +08:00
parent 2cee5fc75e
commit 489a87e0ec
11 changed files with 209 additions and 227 deletions
+16 -11
View File
@@ -248,18 +248,23 @@ class baseEntry
*/
public function loadController($moduleName, $methodName)
{
global $app;
$app->setModuleName($moduleName);
$app->setMethodName($methodName);
$app->setControlFile();
ob_start();
/*
* 引入该模块的control文件。
* Include the control file of the module.
**/
$file2Included = $app->setActionExtFile() ? $app->extActionFile : $app->controlFile;
chdir(dirname($file2Included));
helper::import($file2Included);
if(!class_exists($moduleName) and !class_exists("my$moduleName"))
{
global $app;
$app->setModuleName($moduleName);
$app->setMethodName($methodName);
$app->setControlFile();
/*
* 引入该模块的control文件。
* Include the control file of the module.
**/
$file2Included = $app->setActionExtFile() ? $app->extActionFile : $app->controlFile;
chdir(dirname($file2Included));
helper::import($file2Included);
}
/*
* 设置control的类名。