mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
加强调试信息
This commit is contained in:
@@ -149,6 +149,8 @@ class View
|
||||
*/
|
||||
public function fetch($template = '', $vars = [], $cache = [], $renderContent = false)
|
||||
{
|
||||
// 模板变量
|
||||
$vars = $vars ? $vars : $this->data;
|
||||
if (!$renderContent) {
|
||||
// 获取模板文件名
|
||||
$template = $this->parseTemplate($template);
|
||||
@@ -157,8 +159,9 @@ class View
|
||||
if (!is_file($template) || (APP_DEBUG && IS_WIN && realpath($template) != $template)) {
|
||||
throw new Exception('template file not exists:' . $template, 10700);
|
||||
}
|
||||
// 记录视图信息
|
||||
Log::record('[ VIEW ] ' . $template . ' [ VARS : ' . var_export($vars, true) . ' ]', 'info');
|
||||
}
|
||||
$vars = $vars ? $vars : $this->data;
|
||||
// 页面缓存
|
||||
ob_start();
|
||||
ob_implicit_flush(0);
|
||||
|
||||
Reference in New Issue
Block a user