mirror of https://gitee.com/karson/fastadmin.git
优化配置目录
parent
cf4949db77
commit
36dfe45715
|
|
@ -197,7 +197,7 @@ class Install extends Command
|
|||
$adminFile = ROOT_PATH . 'public' . DS . 'admin.php';
|
||||
|
||||
// 数据库配置文件
|
||||
$dbConfigFile = APP_PATH . 'database.php';
|
||||
$dbConfigFile = CONF_PATH . 'database.php';
|
||||
$config = @file_get_contents($dbConfigFile);
|
||||
$callback = function ($matches) use ($mysqlHostname, $mysqlHostport, $mysqlUsername, $mysqlPassword, $mysqlDatabase, $mysqlPrefix) {
|
||||
$field = "mysql" . ucfirst($matches[1]);
|
||||
|
|
@ -232,7 +232,7 @@ class Install extends Command
|
|||
//修改站点名称
|
||||
if ($siteName != __('My Website')) {
|
||||
$instance->name('config')->where('name', 'name')->update(['value' => $siteName]);
|
||||
$configFile = APP_PATH . 'extra' . DS . 'site.php';
|
||||
$configFile = CONF_PATH . 'extra' . DS . 'site.php';
|
||||
$config = include $configFile;
|
||||
$configList = $instance->name("config")->select();
|
||||
foreach ($configList as $k => $value) {
|
||||
|
|
@ -271,7 +271,7 @@ class Install extends Command
|
|||
];
|
||||
|
||||
//数据库配置文件
|
||||
$dbConfigFile = APP_PATH . 'database.php';
|
||||
$dbConfigFile = CONF_PATH . 'database.php';
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
||||
throw new Exception(__("The current version %s is too low, please use PHP 5.5 or higher", PHP_VERSION));
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ class Config extends Backend
|
|||
$config[$value['name']] = $value['value'];
|
||||
}
|
||||
file_put_contents(
|
||||
APP_PATH . 'extra' . DS . 'site.php',
|
||||
CONF_PATH . 'extra' . DS . 'site.php',
|
||||
'<?php' . "\n\nreturn " . var_export($config, true) . ";"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue