加强调试信息

This commit is contained in:
thinkphp
2016-01-27 23:05:46 +08:00
parent cc753a884e
commit 7352655e36
4 changed files with 11 additions and 8 deletions

View File

@@ -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);