private function display($tpl, $cache = 0) { if (empty(self::$config)) { self::$config = CONFIG::get('fytpl'); } if ($cache == 1) { //使用缓存 $filename = self::$config['tpl_path'] . 'c/' . md5($tpl) . '.php'; } else { //更新缓存 $name = self::$config['tpl_path'] . 'c/' . md5($tpl) . '.php'; if (self::$config['debug'] == 1) { $name = self::$config['tpl_path'] . 'c/' . 'debug_file.php'; } //die($name); $sig = file_put_contents($name, self::$output); self::$output = ''; if (!$sig) { echo '<meta http-equiv="content-type"content="text/html; charset=UTF-8"/>'; FYTOOL::debug('对不起,目录 ' . self::$config['tpl_path'] . 'c/ 不可写入,请检查文件权限。'); } $filename = $name; } return $filename; }
public function action_license() { FYTOOL::debug($this->get_route()); $this->render('license'); }
public static function debug() { self::init(); $map = array(); FYTOOL::debug(self::findOne('loginfos', $map)); }