Browse Source

修正命令行初始化安装错误

tags/6.3.0
tianya 1 year ago
parent
commit
1b72d3843d
2 changed files with 10 additions and 1 deletions
  1. +4
    -0
      src/admin/config.php
  2. +6
    -1
      src/system/common.inc.php

+ 4
- 0
src/admin/config.php View File

@@ -9,6 +9,10 @@
*/
define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__)));
require_once(DEDEADMIN.'/../system/common.inc.php');
if (!file_exists(DEDEDATA.'/common.inc.php')) {
header('Location:../install/index.php');
exit();
}
require_once(DEDEINC.'/userlogin.class.php');
header('Cache-Control:private');
$dsql->safeCheck = FALSE;


+ 6
- 1
src/system/common.inc.php View File

@@ -127,7 +127,12 @@ if ($_FILES) {
require_once(DEDEINC.'/uploadsafe.inc.php');
}
//数据库配置文件
require_once(DEDEDATA.'/common.inc.php');
if (file_exists(DEDEDATA.'/common.inc.php')) {
require_once(DEDEDATA.'/common.inc.php');
} else {
$cfg_dbtype = $cfg_dbhost = $cfg_dbname= $cfg_dbuser = $cfg_dbpwd = $cfg_dbprefix = $cfg_db_language =''; //数据库类型
}

if (!isset($cfg_dbtype)) {
$cfg_dbtype = 'mysql';
}


Loading…
Cancel
Save