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);
}
cy_lang | zh |
USER | www |
HOME | /alidata/www |
HTTP_COOKIE | cy_lang=zh |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_HOST | www.600711.com |
HTTP_USER_AGENT | serpstatbot/2.1 (advanced backlink tracking bot; https://serpstatbot.com/; abuse@serpstatbot.com) |
PHP_ADMIN_VALUE | open_basedir=/alidata/wwwroot/www.600711.com/public/:/tmp/:/proc/:/alidata/wwwroot/ |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.600711.com |
SERVER_PORT | 80 |
SERVER_ADDR | 10.171.225.157 |
REMOTE_PORT | 32940 |
REMOTE_ADDR | 170.130.7.94 |
SERVER_SOFTWARE | nginx/1.18.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /alidata/wwwroot/www.600711.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /employee_story/company_news |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//employee_story/company_news |
SCRIPT_FILENAME | /alidata/wwwroot/www.600711.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1702440692.615 |
REQUEST_TIME | 1702440692 |