설치시 서버의 기본 경로를 받도록 설정

This commit is contained in:
2018-03-18 05:19:28 +09:00
parent b52bd4e4e2
commit bd26ee858c
4 changed files with 36 additions and 5 deletions
+11 -2
View File
@@ -25,14 +25,22 @@ $port = util::array_get($_POST['db_port']);
$username = util::array_get($_POST['db_id']);
$password = util::array_get($_POST['db_pw']);
$dbName = util::array_get($_POST['db_name']);
$servHost = util::array_get($_POST['serv_host']);
if(!$host || !$port || !$username || !$password || !$dbName){
if(!$host || !$port || !$username || !$password || !$dbName || !$servHost){
returnJson([
'result'=>false,
'reason'=>'입력 값이 올바르지 않습니다'
]);
}
if(!filter_var($servHost, FILTER_VALIDATE_URL)){
returnJson([
'result'=>false,
'reason'=>'접속 경로가 올바르지 않습니다.'
]);
}
if(file_exists(ROOT.'/d_setting/conf.php') && is_dir(ROOT.'/d_setting/conf.php')){
returnJson([
'result'=>false,
@@ -141,7 +149,8 @@ $result = generateFileUsingSimpleTemplate(
'password'=>$password,
'dbName'=>$dbName,
'port'=>$port,
'globalSalt'=>$globalSalt
'globalSalt'=>$globalSalt,
'serverBasePath'=>$servHost
]
);