게임 코드에도 Composer의 ClassLoader를 이용하는 코드로 변경

입구 코드에서 WebUtil::setHeaderNoCache(); 수동 지정
에러 페이지 변경
This commit is contained in:
2018-04-04 02:51:14 +09:00
parent e1c97b1ca0
commit fcbd801dc7
11 changed files with 116 additions and 123 deletions
+1 -11
View File
@@ -8,11 +8,6 @@ define('IMAGES', '../../images');
define('ROOT', realpath(__dir__.'/..'));
function CustomHeader() {
//xxx: CustomHeader를 제거하기 전까진 유지
WebUtil::setHeaderNoCache();
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
@@ -22,14 +17,9 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in
$date = date("Ymd_His");
file_put_contents(__DIR__.'/../d_log/err_log.txt',"$date, $errno, $errstr, $errfile, $errline\n", FILE_APPEND);
file_put_contents(ROOT.'/d_log/err_log.txt',"$date, $errno, $errstr, $errfile, $errline\n", FILE_APPEND);
/* Don't execute PHP internal error handler */
//return true;
}
set_error_handler("\sammo\logErrorByCustomHandler");
function Error($msg) {
file_put_contents(ROOT.'/d_log/err.txt', $msg."\n", FILE_APPEND);
exit(1);
}