forked from devsam/core
DB 로그인을 utf8이 아니라 utf8mb4로 변경
This commit is contained in:
@@ -9,7 +9,7 @@ class RootDB{
|
||||
private static $password = '_tK_password_';
|
||||
private static $dbName = '_tK_dbName_';
|
||||
private static $port = _tK_port_;
|
||||
private static $encoding = 'utf8';
|
||||
private static $encoding = 'utf8mb4';
|
||||
|
||||
private static $globalSalt = '_tK_globalSalt_';
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ if(!file_exists(ROOT.'/d_setting/.htaccess')){
|
||||
|
||||
//DB 접근 권한 검사
|
||||
|
||||
$rootDB = new \MeekroDB($host,$username,$password,$dbName,$port,'utf8');
|
||||
$rootDB = new \MeekroDB($host,$username,$password,$dbName,$port,'utf8mb4');
|
||||
$rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
|
||||
$rootDB->throw_exception_on_nonsql_error = false;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ namespace sammo;
|
||||
|
||||
function MYDB_connect($host, $id, $pw) {
|
||||
$conn = mysqli_connect($host, $id, $pw);
|
||||
mysqli_query($conn, 'set names utf8');
|
||||
mysqli_query($conn, 'set names utf8mb4');
|
||||
return $conn;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class DB{
|
||||
private static $password = '_tK_password_';
|
||||
private static $dbName = '_tK_dbName_';
|
||||
private static $port = _tK_port_;
|
||||
private static $encoding = 'utf8';
|
||||
private static $encoding = 'utf8mb4';
|
||||
|
||||
private static $prefix = '_tK_prefix_';
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function dbConnFail($params){
|
||||
}
|
||||
|
||||
|
||||
$db = new \MeekroDB($host,$username,$password,$dbName,$port,'utf8');
|
||||
$db = new \MeekroDB($host,$username,$password,$dbName,$port,'utf8mb4');
|
||||
$db->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
|
||||
$db->throw_exception_on_nonsql_error = false;
|
||||
|
||||
+3
-16
@@ -99,28 +99,15 @@ $image1 = "../d_pic";
|
||||
$images = "/images";
|
||||
$image = "/image";
|
||||
|
||||
|
||||
// Data, Icon, 세션디렉토리의 쓰기 권한이 없다면 에러 처리
|
||||
// 단, 폴더가 없는 경우라면 폴더를 생성 할 필요가 있음.
|
||||
// data폴더가 없으면 data/session까지 생성
|
||||
if(is_dir(__DIR__."/data")){
|
||||
if(!is_writable(__DIR__."/data")) Error("Data 디렉토리의 쓰기 권한이 없습니다!");
|
||||
}else{
|
||||
mkdir(__DIR__."/data");
|
||||
}
|
||||
|
||||
session_cache_limiter('nocache, must_revalidate');//NOTE: 캐시가 가능하도록 설정해야 할 수도 있음. 주의!
|
||||
session_cache_limiter('nocache');//NOTE: 캐시가 가능하도록 설정해야 할 수도 있음. 주의!
|
||||
//FIXME: 이곳에서 설정하면 안될 듯 하다. 옮기자.
|
||||
|
||||
/**
|
||||
* Session에 보관된 장수 정보를 제거함.
|
||||
* _prefix_p_no, _prefix_p_name 두 값임
|
||||
*/
|
||||
function resetSessionGeneralValues(){
|
||||
$idKey = DB::prefix().'p_no';
|
||||
$nameKey = DB::prefix().'p_name';
|
||||
|
||||
unset($_SESSION[$idKey]);
|
||||
unset($_SESSION[$nameKey]);
|
||||
Session::Instance()->logoutGame();
|
||||
}
|
||||
|
||||
// MySQL 데이타 베이스에 접근
|
||||
|
||||
Reference in New Issue
Block a user