diff --git a/src/MultiApp.php b/src/MultiApp.php index 4a6e8fe..f069aeb 100644 --- a/src/MultiApp.php +++ b/src/MultiApp.php @@ -95,7 +95,7 @@ protected function parseMultiApp(): bool $scriptName = $this->getScriptName(); $defaultApp = $this->app->config->get('app.default_app') ?: 'index'; - if ($this->name || ($scriptName && !in_array($scriptName, ['index', 'think']))) { + if ($this->name || ($scriptName && !in_array($scriptName, ['index', 'router', 'think']))) { $appName = $this->name ?: $scriptName; $this->app->http->setBind(); } else { @@ -129,6 +129,10 @@ protected function parseMultiApp(): bool $deny = $this->app->config->get('app.deny_app_list', []); $name = current(explode('/', $path)); + if (strpos($name, '.')) { + $name = strstr($name, '.', true); + } + if (isset($map[$name])) { if ($map[$name] instanceof Closure) { $result = call_user_func_array($map[$name], [$this->app]);