protected function send_header()
 {
     if (IS_DEBUG) {
         header_remove();
     }
     Core::close_buffers(false);
     HttpIO::set_cache_header(86400);
 }
Beispiel #2
0
 /**
  * 页面输出header缓存
  *
  * 0表示不缓存
  *
  * @param int $time 缓存时间,单位秒
  */
 public static function header_cache($time = 86400)
 {
     HttpIO::set_cache_header($time);
 }
Beispiel #3
0
 /**
  * 系统调用内容输出函数(请勿自行执行)
  */
 public static function _output_body()
 {
     # 发送header数据
     HttpIO::send_headers();
     if (IS_DEBUG && isset($_REQUEST['debug']) && class_exists('Profiler', true)) {
         # 调试打开时不缓存页面
         HttpIO::set_cache_header(0);
     }
     # 执行注册的关闭方法
     ob_start();
     Core::event_trigger('system.shutdown');
     $output = ob_get_clean();
     # 在页面输出前关闭所有的连接
     Core::close_all_connect();
     # 输出内容
     echo Core::$output, $output;
 }
Beispiel #4
0
 /**
  * 内容输出函数,只执行一次
  *
  * @param string $output
  */
 public static function output()
 {
     static $run = null;
     if (true === $run) {
         return true;
     }
     $run = true;
     # 发送header数据
     HttpIO::send_headers();
     if (IS_DEBUG && isset($_REQUEST['debug']) && class_exists('Profiler', true)) {
         # 调试打开时不缓存页面
         HttpIO::set_cache_header(0);
     }
     ob_start();
     # 执行注册的关闭方法
     Core::run_shutdown_function();
     $output = ob_get_clean();
     # 在页面输出前关闭所有的连接
     Core::close_all_connect();
     # 输出内容
     echo Core::$output, $output;
 }