From 89cb51fd13ff594b3f6fe01debb6df900b6e6340 Mon Sep 17 00:00:00 2001 From: bnu Date: Sun, 4 Jan 2009 18:03:55 +0000 Subject: [PATCH] =?UTF-8?q?debugPrint()=ED=95=A8=EC=88=98=EA=B0=80=20?= =?UTF-8?q?=EB=94=94=EB=B2=84=EA=B7=B8=20=EB=AA=A8=EB=93=9C=20=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94=20=EB=90=98=EC=96=B4=20=EC=9E=88=EB=8A=94=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=EC=97=90=EB=A7=8C=20=EB=8F=99=EC=9E=91?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5204 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/func.inc.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/config/func.inc.php b/config/func.inc.php index 4bae4ba18..852a1cd89 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -277,7 +277,7 @@ $g_min = $t_min - $c_min; $g_hour = $t_hour - $c_hour; - $gap = $g_min*60 + $g_hour*60*60; //TODO : 연산 우선순위에 따라 코드를 묶어줄 필요가 있음 + $gap = $g_min*60 + $g_hour*60*60; return $gap; } @@ -387,16 +387,18 @@ * tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다 **/ function debugPrint($buff = null, $display_line = true) { - $debug_file = _XE_PATH_."files/_debug_message.php"; - $bt = debug_backtrace(); - if(is_array($bt)) $first = array_shift($bt); - $buff = sprintf("[%s %s:%d]\n%s\n", date("Y-m-d H:i:s"), array_pop(explode(DIRECTORY_SEPARATOR, $first["file"])), $first["line"], print_r($buff,true)); + if(__DEBUG__ != 0 && __DEBUG_OUTPUT__ === 1) { + $debug_file = _XE_PATH_."files/_debug_message.php"; + $bt = debug_backtrace(); + if(is_array($bt)) $first = array_shift($bt); + $buff = sprintf("[%s %s:%d]\n%s\n", date("Y-m-d H:i:s"), array_pop(explode(DIRECTORY_SEPARATOR, $first["file"])), $first["line"], print_r($buff,true)); - if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; + if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; - if(@!$fp = fopen($debug_file,"a")) return; - fwrite($fp, $buff); - fclose($fp); + if(@!$fp = fopen($debug_file,"a")) return; + fwrite($fp, $buff); + fclose($fp); + } } /**