Files
core/d_setting/conf.orig.php
T
Hide_D 037a29ad02 autoload 경로 재 변경
kakao를 별도의 namespace로 분리
외부 class의 namespace 문제 해결
2018-03-24 18:46:37 +09:00

47 lines
961 B
PHP

<?php
namespace sammo;
require(__dir__.'/../vendor/autoload.php');
/**
* 비밀번호 해시용 전역 SALT 반환
* 비밀번호는 sha512(usersalt|sha512(globalsalt|password|globalsalt)|usersalt); 순임
*
* @return string
*/
function getGlobalSalt(){
return '_tK_globalSalt_';
}
/**
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
*
* @return string
*/
function getServerBasepath(){
return '_tK_serverBasePath_';
}
/**
* DB 객체 생성
*
* @return \MeekroDB
*/
function getRootDB(){
$host = '_tK_host_';
$user = '_tK_user_';
$password = '_tK_password_';
$dbName = '_tK_dbName_';
$port = _tK_port_;
$encoding = 'utf8';
static $uDB = null;
if($uDB === null){
$uDB = new \MeekroDB($host,$user,$password,$dbName,$port,$encoding);
$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
}
return $uDB;
}