public function fetch($template, $data = [], $config = [])
{
if ('' == pathinfo($template, PATHINFO_EXTENSION)) {
// 获取模板文件名
$template = $this->parseTemplate($template);
}
// 模板不存在 抛出异常
if (!is_file($template)) {
throw new TemplateNotFoundException('template not exists:' . $template, $template);
}
// 记录视图信息
$this->app
->log('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]');
$this->template->fetch($template, $data, $config);
}
USER | www |
HOME | /home/www |
FCGI_ROLE | RESPONDER |
SCRIPT_FILENAME | /www/wwwroot/grwt/public/index.php |
QUERY_STRING | s=/show-38-498.html |
REQUEST_METHOD | GET |
CONTENT_TYPE | |
CONTENT_LENGTH | |
SCRIPT_NAME | /index.php |
REQUEST_URI | /show-38-498.html |
DOCUMENT_URI | /index.php |
DOCUMENT_ROOT | /www/wwwroot/grwt/public |
SERVER_PROTOCOL | HTTP/2.0 |
REQUEST_SCHEME | https |
HTTPS | on |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_SOFTWARE | nginx/1.22.1 |
REMOTE_ADDR | 44.223.42.120 |
REMOTE_PORT | 43294 |
SERVER_ADDR | 172.16.192.240 |
SERVER_PORT | 443 |
SERVER_NAME | www.growatt.com |
REDIRECT_STATUS | 200 |
PATH_INFO | |
HTTP_HOST | www.growatt.com |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711722950.7925 |
REQUEST_TIME | 1711722950 |
APP_PATH | /www/wwwroot/grwt/application |
__PUBLIC__ |