Skip to content

Commit

Permalink
修改open_basedir在unix和windows分隔符不一致问题
Browse files Browse the repository at this point in the history
  • Loading branch information
titrxw committed Nov 24, 2020
1 parent 1ce4cf8 commit b127067
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Core/Bootstrap/RegisterSecurityDirBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function bootstrap(App $app) {
//设置安全限制目录
$openBaseDirConfig = $app->getConfigger()->get('app.setting.basedir', []);
if (is_array($openBaseDirConfig)) {
$openBaseDirConfig = implode(':', $openBaseDirConfig);
$openBaseDirConfig = implode(PATH_SEPARATOR, $openBaseDirConfig);
}

$openBaseDir = [
Expand All @@ -29,6 +29,6 @@ public function bootstrap(App $app) {
$openBaseDirConfig,
session_save_path()
];
ini_set('open_basedir', implode(':', $openBaseDir));
ini_set('open_basedir', implode(PATH_SEPARATOR, $openBaseDir));
}
}

0 comments on commit b127067

Please sign in to comment.