autoloader 구성.

class 정의
This commit is contained in:
2018-03-24 18:13:03 +09:00
parent 3363b547d5
commit 462bafe806
185 changed files with 570 additions and 225 deletions
+2 -20
View File
@@ -1,4 +1,6 @@
<?php
namespace sammo;
require(__dir__.'/../vendor/autoload.php');
function SetHeaderNoCache(){
@@ -116,26 +118,6 @@ function delExpiredInDir($dir, $t) {
return $success;
}
function returnJson($value, $noCache = true, $pretty = false, $die = true){
if($noCache){
SetHeaderNoCache();
}
header('Content-Type: application/json');
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);
}