}
if ('' == pathinfo($template, PATHINFO_EXTENSION)) {
// 获取模板文件名
$template = $this->parseTemplate($template);
}
// 模板不存在 抛出异常
if (!is_file($template)) {
throw new TemplateNotFoundException('template not exists:' . $template, $template);
}
$this->template->fetch($template, $data);
}
/**
* 渲染模板内容
* @access public
* @param string $template 模板内容
USER | www |
HOME | /dev/null |
HTTP_HOST | www.rooy.cn |
HTTP_REFERER | http://www.rooy.cn/index.php?c=article&a=type&tid=58 |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
REDIRECT_STATUS | 200 |
SERVER_NAME | rooy.cn |
SERVER_PORT | 80 |
SERVER_ADDR | 172.17.87.175 |
REMOTE_PORT | 55854 |
REMOTE_ADDR | 3.94.150.98 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/web/rooy_newpc/public_html/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /article/58 |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//article/58 |
SERVER_SOFTWARE | nginx |
GATEWAY_INTERFACE | CGI/1.1 |
PATH_INFO | |
SCRIPT_FILENAME | /www/web/rooy_newpc/public_html/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711668313.2913 |
REQUEST_TIME | 1711668313 |