fix installation css create database connect error
This commit is contained in:
parent
4558d805b1
commit
e21a9b9f73
2 changed files with 22 additions and 2 deletions
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
@include_once "./_common.php";
|
||||
|
||||
|
||||
// CSS 설정 가져오기
|
||||
$css_sql = sql_query("select * from {$g5['css_table']}");
|
||||
$css = [];
|
||||
|
|
|
|||
|
|
@ -367,17 +367,38 @@ EOD;
|
|||
// CSS 설정 파일 생성
|
||||
$css_data_path = $g5_path['path'] . "/css";
|
||||
$css_data_url = $g5_path['url'] . "/css";
|
||||
|
||||
@mkdir($css_data_path, G5_DIR_PERMISSION);
|
||||
@chmod($css_data_path, G5_DIR_PERMISSION);
|
||||
|
||||
$file = '../' . G5_CSS_DIR . '/_design.config.css';
|
||||
$file_path = $css_data_path . '/_design.config.css';
|
||||
|
||||
@unlink($file_path);
|
||||
$f = @fopen($file, 'a');
|
||||
?>
|
||||
<li style="display:none;">
|
||||
<?php
|
||||
|
||||
if (!isset($g5)) {
|
||||
$g5 = [];
|
||||
}
|
||||
|
||||
if (!isset($g5['connect_db'])) {
|
||||
$connect_db = sql_connect($mysql_host, $mysql_user, $mysql_pass) or die('MySQL Connect Error!!!');
|
||||
$select_db = sql_select_db($mysql_db, $connect_db) or die('MySQL DB Error!!!');
|
||||
|
||||
$g5['connect_db'] = $connect_db;
|
||||
|
||||
sql_set_charset('utf8', $connect_db);
|
||||
if (defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE)
|
||||
sql_query("SET SESSION sql_mode = ''");
|
||||
if (defined('G5_TIMEZONE'))
|
||||
sql_query(" set time_zone = '" . G5_TIMEZONE . "'");
|
||||
}
|
||||
|
||||
ob_start();
|
||||
include("../adm/design_form_css.php");
|
||||
include "../adm/design_form_css.php";
|
||||
$css = ob_get_contents();
|
||||
ob_end_flush();
|
||||
fwrite($f, $css);
|
||||
|
|
|
|||
Loading…
Reference in a new issue