Skip to content

Commit

Permalink
改进多应用判断
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Oct 8, 2019
1 parent cb9760a commit 27bb12f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MultiApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ protected function parseMultiApp(): void
{
$scriptName = $this->getScriptName();

if ('index' == $scriptName) {
if ($this->name || 'index' != $scriptName) {
$appName = $this->name ?: $scriptName;
$this->app->http->setBind();
} else {
// 自动多应用识别
$this->app->http->setBind(false);
$appName = null;
Expand Down Expand Up @@ -136,9 +139,6 @@ protected function parseMultiApp(): void
$this->app->request->setPathinfo(strpos($path, '/') ? ltrim(strstr($path, '/'), '/') : '');
}
}
} else {
$appName = $this->name ?: $this->getScriptName();
$this->app->http->setBind();
}

$this->setApp($appName ?: $this->app->config->get('app.default_app', 'index'));
Expand Down

0 comments on commit 27bb12f

Please sign in to comment.