예제 #1
0
파일: common.php 프로젝트: noikiy/mdwp
function render($tFile, $vs=array()) {
    ob_start();
    foreach($GLOBALS AS $_k=>$_v) {
        ${$_k} = $_v;
    }
	foreach($vs AS $_k=>$_v) {
		${$_k} = $_v;
	}
	include template($tFile);
    return render_hook(ob_get_clean());
}
예제 #2
0
 function __destruct()
 {
     global $AJAX, $INI;
     if (self::$_debug && !$AJAX) {
         echo 'Generation Cost: ' . (microtime(true) - self::$_begin) . 's';
     }
     $c = ob_get_clean();
     if (function_exists('render_hook')) {
         $c = render_hook($c);
     }
     if (function_exists('output_hook')) {
         die(output_hook($c));
     }
     die($c);
 }