/** * 'include_file' tpl func */ public static function include_file($params, $tpl = NULL) { $file = $params['name']; $zip = isset($params['zip']) ? $params['zip'] : 0; $file = View::tpl_realpath($file); if (!$tpl->is_cached($file)) { } $result = $tpl->fetch($file); if ($zip) { $result = simphp_ziphtml($result); } return $result; }
/** * Generating php template absolute path by tpl name * * @param string $tpl_name template name * @return string */ function T($tpl_name) { $tpl = Template::$_instance; if ('PlainTpl' === $tpl->driverClass) { $tplrealpath = $tpl->driverObj->compile(View::tpl_realpath($tpl_name)); return $tplrealpath; } return ''; }