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 | hhggm |
HOME | /home/hhggm |
HTTP_X_VARNISH | 29902854 |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_GRACE | none |
HTTP_X_FORWARDED_FOR | 3.229.122.112, 172.71.194.9, 127.0.0.1 |
HTTP_CF_IPCOUNTRY | US |
HTTP_CDN_LOOP | cloudflare |
HTTP_CF_CONNECTING_IP | 3.229.122.112 |
HTTP_REFERER | http://shudm.com/rank |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_CF_VISITOR | {"scheme":"https"} |
HTTP_X_FORWARDED_PROTO | https |
HTTP_CF_RAY | 866a89bd6bd757ee-IAD |
HTTP_X_REAL_IP | 172.71.194.9 |
HTTP_X_FORWARDED_HOST | llmmh.com |
HTTP_HOST | llmmh.com |
PHP_VALUE | error_log=/home/hhggm/logs/php/error.log; memory_limit=1G; max_execution_time=60; max_input_time=60; max_input_vars=10000; post_max_size=64M; upload_max_filesize=64M; auto_prepend_file=/home/hhggm/.varnish-cache/controller.php; date.timezone=UTC; display_errors=off; |
HTTPS | on |
MGT | 1 |
GEOIP_LONGITUDE | |
GEOIP_LATITUDE | |
GEOIP_CITY_CONTINENT_CODE | |
GEOIP_POSTAL_CODE | |
GEOIP_CITY | |
GEOIP_REGION | |
GEOIP_CITY_COUNTRY_NAME | |
GEOIP_CITY_COUNTRY_CODE3 | |
GEOIP_CITY_COUNTRY_CODE | |
GEOIP_COUNTRY_NAME | United States |
GEOIP_COUNTRY_CODE3 | USA |
GEOIP_COUNTRY_CODE | US |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.hhggm.com |
SERVER_PORT | 443 |
SERVER_ADDR | 127.0.0.1 |
REMOTE_PORT | |
REMOTE_ADDR | 172.71.194.9 |
SERVER_SOFTWARE | nginx/1.21.4 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /home/hhggm/htdocs/www.hhggm.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /index.php?s=//rank |
SCRIPT_NAME | /index.php |
SCRIPT_FILENAME | /home/hhggm/htdocs/www.hhggm.com/public/index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//rank |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1710820643.475 |
REQUEST_TIME | 1710820643 |
VARNISH_DEVELOPER_MODE | false |
VARNISH_GENERIC_CONTROLLER_VERSION | 0.0.1 |
BOOKCTRL | book |
CHAPTERCTRL | chapter |
TAGCTRL | tag |
BOOKLISTACT | booklist |
SEARCHCTRL | search |
RANKCTRL | rank |
UPDATEACT | update |
AUTHORCTRL | author |
spider_db_conn | xxx |