카카오 로그인을 이용한 가입 테스트
This commit is contained in:
@@ -107,3 +107,28 @@ function delExpiredInDir($dir, $t) {
|
||||
}
|
||||
|
||||
|
||||
function returnJson($value, $noCache = true, $pretty = false, $die = true){
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if($noCache){
|
||||
header('Expires: Sun, 01 Jan 2014 00:00:00 GMT');
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
|
||||
if($pretty){
|
||||
$flag = JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT;
|
||||
}
|
||||
else{
|
||||
$flag = JSON_UNESCAPED_UNICODE;
|
||||
}
|
||||
echo json_encode($value, $flag);
|
||||
if($die){
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
function hashPassword($salt, $password){
|
||||
return hash('sha512', $salt.$password.$salt);
|
||||
}
|
||||
Reference in New Issue
Block a user