}
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 模板内容
/news/details-282_shtml |
USER | www |
HOME | /home/www |
SCRIPT_NAME | /index.php |
REQUEST_URI | /news/details-282.shtml |
QUERY_STRING | /news/details-282.shtml |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_QUERY_STRING | /news/details-282.shtml |
REDIRECT_URL | /news/details-282.shtml |
REMOTE_PORT | 36530 |
SCRIPT_FILENAME | /www/wwwroot/tpadhesivetape.com/public/index.php |
SERVER_ADMIN | webmaster@example.com |
CONTEXT_DOCUMENT_ROOT | /www/wwwroot/tpadhesivetape.com/public |
CONTEXT_PREFIX | |
REQUEST_SCHEME | http |
DOCUMENT_ROOT | /www/wwwroot/tpadhesivetape.com/public |
REMOTE_ADDR | 34.200.219.10 |
SERVER_PORT | 80 |
SERVER_ADDR | 172.24.43.136 |
SERVER_NAME | tpadhesivetape.com |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | <address>Apache Server at tpadhesivetape.com Port 80</address> |
LD_LIBRARY_PATH | /www/server/apache/lib |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin |
HTTP_HOST | tpadhesivetape.com |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
proxy-nokeepalive | 1 |
REDIRECT_STATUS | 200 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711415.0848 |
REQUEST_TIME | 1711711415 |