mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#120 압축전송시 생기는 문제를 해결하지는 못하였고(재현 불가능) 일단 ob_gzhandler를 위한 모든 관련 자원에 대해 체크를 하게 하고 config/config.inc.php에서 압축전송을 켜고 끌 수 있는 설정을 마련하는 것으로 일단락.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2444 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0767476eba
commit
13c9711400
2 changed files with 26 additions and 11 deletions
|
|
@ -22,7 +22,12 @@
|
|||
function printContent(&$oModule) {
|
||||
|
||||
// gzip encoding 지원 여부 체크
|
||||
if(strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')!==false && function_exists('ob_gzhandler') ) $this->gz_enabled = true;
|
||||
if(
|
||||
(defined('__OB_GZHANDLER_ENABLE__') && __OB_GZHANDLER_ENABLE__ == 1) &&
|
||||
strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')!==false &&
|
||||
function_exists('ob_gzhandler') &&
|
||||
extension_loaded('zlib')
|
||||
) $this->gz_enabled = true;
|
||||
|
||||
// header 출력
|
||||
$this->_printHeader();
|
||||
|
|
@ -78,15 +83,14 @@
|
|||
|
||||
// 컨텐츠 출력
|
||||
$this->display($output);
|
||||
|
||||
// 디버깅 데이터 출력
|
||||
$this->_debugOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 최종 결과물의 출력
|
||||
**/
|
||||
function display($content) {
|
||||
$content .= $this->_debugOutput();
|
||||
|
||||
$path = str_replace('index.php','',$_SERVER['SCRIPT_NAME']);
|
||||
|
||||
// files로 시작되는 src나 href의 값을 절대경로로 변경
|
||||
|
|
@ -163,7 +167,8 @@
|
|||
* tail -f ./files/_debug_message.php로 하여 console로 확인하면 편리함\n
|
||||
**/
|
||||
function _debugOutput() {
|
||||
if(!__DEBUG__ || (__DEBUG_OUTPUT!=0 && Context::getResponseMethod()!='HTML') ) return;
|
||||
if(!__DEBUG__ || Context::getResponseMethod()!='HTML' ) return;
|
||||
|
||||
$end = getMicroTime();
|
||||
|
||||
// debug string 작성 시작
|
||||
|
|
@ -207,6 +212,8 @@
|
|||
// 전체 실행 시간 작성
|
||||
$buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__);
|
||||
|
||||
if(__DEBUG_OUTPUT__==1) return $buff;
|
||||
|
||||
debugPrint($buff, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue