}
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 | /home/www |
HTTP_HOST | c2.funcmf.com |
HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_ACCEPT | */* |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | c1.funcmf.com |
SERVER_PORT | 80 |
SERVER_ADDR | 172.18.75.237 |
REMOTE_PORT | 60670 |
REMOTE_ADDR | 52.14.201.86 |
SERVER_SOFTWARE | nginx/1.22.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/c1.funcmf.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /sitemap.xml |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/sitemap.xml |
SCRIPT_FILENAME | /www/wwwroot/c1.funcmf.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1741743736.5475 |
REQUEST_TIME | 1741743736 |