예제 #1
0
파일: index.php 프로젝트: vasvlad/majordomo
        }
    }
}
// END: language constants
if (!headers_sent()) {
    header("HTTP/1.0: 200 OK\n");
    header('Content-Type: text/html; charset=utf-8');
}
function echobig($string, $bufferSize = 8192)
{
    $chars = strlen($string) - 1;
    for ($start = 0; $start <= $chars; $start += $bufferSize) {
        echo substr($string, $start, $bufferSize);
    }
}
startMeasure('final_echo');
ob_start("ob_gzhandler");
// should be un-commented for production server
echobig($result);
endMeasure('final_echo', 1);
if ($cache_filename != '' && $cached_result == '') {
    SaveFile(ROOT . 'cached/' . $cache_filename, $result);
}
$session->save();
// closing database connection
$db->Disconnect();
// end calculation of execution time
endMeasure('TOTAL');
// print performance report
performanceReport();
// ob_end_flush();
예제 #2
0
 }


function echobig($string, $bufferSize = 8192) {
        $chars=strlen($string)-1;
        for ($start=0;$start <= $chars;$start += $bufferSize) {
                echo substr($string,$start,$bufferSize);
        }

}

 startMeasure('final_echo');
 //ob_start("ob_gzhandler"); // should be un-commented for production server
 echobig($result);
 endMeasure('final_echo');

 if ($cache_filename!='' && $cached_result=='') {
  SaveFile(ROOT.'cached/'.$cache_filename, $result);
 }



 $session->save();
 $db->Disconnect(); // closing database connection

 endMeasure('TOTAL'); // end calculation of execution time
 performanceReport(); // print performance report

// ob_end_flush();

?>