}
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 模板内容
PHPSESSID | f98f07afb7e8e559c344fd450055897c |
USER | www |
HOME | /home/www |
HTTP_COOKIE | PHPSESSID=f98f07afb7e8e559c344fd450055897c |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_HOST | www.yrsw.cn |
HTTP_USER_AGENT | Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.6778.69 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.yrsw.cn |
SERVER_PORT | 80 |
SERVER_ADDR | 192.168.0.153 |
REMOTE_PORT | 59870 |
REMOTE_ADDR | 104.140.201.74 |
SERVER_SOFTWARE | nginx/1.18.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/think.yrsw/think/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /jingyishengchan.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//jingyishengchan.html |
SCRIPT_FILENAME | /www/wwwroot/think.yrsw/think/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1732063086.3138 |
REQUEST_TIME | 1732063086 |