<?php

//页面静态化
if (!function_exists('reset_indexhtml')) {
function reset_indexhtml($fr, $to) {
  global $web, $sql, $db, $persistent;
  if (!isset($web['html'])) {
    @ require 'writable/set/set_html.php';
  }

  if($web['html'] == true) {
    ob_start();
    $indexmod = 1;
    include ($fr);
    $content_t = ob_get_contents();
    ob_end_clean();
    if (write_file($to, $content_t)) {
      return true;
    }
  }
  return false;
}
}


if (!function_exists('chunk_echo')) {
function chunk_echo($text) {
  if (!defined('LIMIT_FLUSH')) {
    $limit = ini_get('output_buffering');
    $limit = is_numeric($limit) && $limit >= 0 ? $limit : 4096;
    define('LIMIT_FLUSH', $limit);
  }
  echo str_pad($text, LIMIT_FLUSH);
  @ob_flush();@flush();
}
}

?>