새로운 설치 코드 준비

This commit is contained in:
2018-03-17 21:21:44 +09:00
parent 7486ff3eec
commit 065107033b
7 changed files with 360 additions and 19 deletions
+17 -1
View File
@@ -15,7 +15,7 @@ function CustomHeader() {
header('Pragma: no-cache');
// header('Cache-Control: public');
// header('Pragma: public');
header('Content-Type: text/html; charset=utf-8');
// header('Content-Type: text/html; charset=utf-8');
}
//define(CURPATH, 'f_async');
//define(FILE, substr(strrchr(__FILE__, "\\"), 1));
@@ -26,6 +26,22 @@ function getmicrotime() {
return $microtimestmp[0] + $microtimestmp[1];
}
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
// through to the standard PHP error handler
return false;
}
$date = date("Ymd_His");
file_put_contents(__DIR__.'/../d_log/err_log.txt',"$date, $errno, $errstr, $errfile, $errline\n");
/* Don't execute PHP internal error handler */
return true;
}
set_error_handler("logErrorByCustomHandler");
function Error($msg) {
AppendToFile(ROOT.'/d_log/err.txt', $msg."\n");
exit(1);