Update install.php (#1357)

修复宝塔面板的网站目录带.导致db路径校验不通过的问题
This commit is contained in:
毛线
2022-04-01 14:07:08 +08:00
committed by GitHub
parent 2f3e15dfb8
commit 2db893e802
+1 -1
View File
@@ -1022,7 +1022,7 @@ function install_step_2_perform()
$error = (new \Typecho\Validate())
->addRule('dbFile', 'required', _t('确认您的配置'))
->addRule('dbFile', function (string $path) {
return !!preg_match("/^(\/[_a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i", $path);
return !!preg_match("/^(\/[._a-z0-9-]+)*[a-z0-9]+\.[a-z0-9]{2,}$/i", $path);
}, _t('确认您的配置'))
->run($config);
break;