* @return void
*/
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);
}
// 记录视图信息
//App::$debug && Log::record('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]', 'info');
// 定义模板常量
$request = request();
$default = [
'__ROOT__' => pathinfo($request->baseFile(true), PATHINFO_DIRNAME),
'__SELF__' => $request->url(TRUE),
'__APP__' => $request->baseFile(TRUE)
USER | changhongiot |
HOME | /home/changhongiotmcghcaanpg7htofnmgmigoot |
FCGI_ROLE | RESPONDER |
REDIRECT_UNIQUE_ID | ZgZHzCBbXY1fGBQVxT7BdwAAAAY |
REDIRECT_PATH_INFO | cases/98 |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZgZHzCBbXY1fGBQVxT7BdwAAAAY |
HTTP_X_FORWARDED_FOR | 3.239.208.72 |
HTTP_X_REAL_IP | 211.149.140.122 |
HTTP_HOST | www.gs-biogas.com |
HTTP_CONNECTION | close |
HTTP_FROM_HTTPS | on |
HTTP_SSL_FLAG | SSL |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_X_FORWARDED_PROTO | https |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
PATH | /sbin:/usr/sbin:/bin:/usr/bin |
SERVER_SIGNATURE | <address>Apache Server at www.gs-biogas.com Port 80</address> |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.gs-biogas.com |
SERVER_ADDR | 127.0.0.1 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.239.208.72 |
DOCUMENT_ROOT | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/public |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/public |
SERVER_ADMIN | webmaster@changhongiot |
SCRIPT_FILENAME | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/public/index.php |
REMOTE_PORT | 54416 |
REDIRECT_URL | /cases/98 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /cases/98 |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711687628.7947 |
REQUEST_TIME | 1711687628 |
DS | / |
ROOT_PATH | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/ |
APP_PATH | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/app/ |
WWW_ROOT | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/public/ |
WOO_PATH | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/woo/ |
ADDONS_PATH | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/addons/ |
APP_CACHE_DIR | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/data/cache/ |
SMARTY_DIR | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/include/smarty-3.1.27/libs/ |
SMARTY_SYSPLUGINS_DIR | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/include/smarty-3.1.27/libs/sysplugins/ |
SMARTY_PLUGINS_DIR | /home/changhongiotmcghcaanpg7htofnmgmigoot/wwwroot/include/smarty-3.1.27/libs/plugins/ |
SMARTY_MBSTRING | true |
SMARTY_RESOURCE_CHAR_SET | UTF-8 |
SMARTY_RESOURCE_DATE_FORMAT | %b %e, %Y |
SMARTY_SPL_AUTOLOAD | 0 |