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);
}
/index/about/index_html |
PATH | C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\VisualSVN Server\bin;C:\Program Files\TortoiseSVN\bin |
SYSTEMROOT | C:\Windows |
COMSPEC | C:\Windows\system32\cmd.exe |
PATHEXT | .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC |
WINDIR | C:\Windows |
PHP_FCGI_MAX_REQUESTS | 1000 |
PHPRC | C:/phpStudy/PHPTutorial/php/php-5.6.27-nts/ |
_FCGI_SHUTDOWN_EVENT_ | 1944 |
HTTP_CONNECTION | close |
SCRIPT_NAME | /index.php |
REQUEST_URI | /index/about/index.html |
QUERY_STRING | /index/about/index.html |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_QUERY_STRING | /index/about/index.html |
REDIRECT_URL | /index/about/index.html |
REMOTE_PORT | 44230 |
SCRIPT_FILENAME | C:/phpStudy/PHPTutorial/WWW/px06/public/index.php |
SERVER_ADMIN | admin@php.cn |
CONTEXT_DOCUMENT_ROOT | C:/phpStudy/PHPTutorial/WWW/px06/public |
CONTEXT_PREFIX | |
REQUEST_SCHEME | http |
DOCUMENT_ROOT | C:/phpStudy/PHPTutorial/WWW/px06/public |
REMOTE_ADDR | 44.192.75.131 |
SERVER_PORT | 80 |
SERVER_ADDR | 172.18.103.154 |
SERVER_NAME | eduforth.com.cn |
SERVER_SOFTWARE | Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9 |
SERVER_SIGNATURE | |
SystemRoot | C:\Windows |
HTTP_HOST | eduforth.com.cn |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
REDIRECT_STATUS | 200 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711675271.7955 |
REQUEST_TIME | 1711675271 |
PATH_INFO | /index/about/index.html |