mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
优化View类对输出内容的替换
This commit is contained in:
@@ -119,7 +119,7 @@ class View
|
|||||||
APP_HOOK && Hook::listen('view_filter', $content);
|
APP_HOOK && Hook::listen('view_filter', $content);
|
||||||
// 允许用户自定义模板的字符串替换
|
// 允许用户自定义模板的字符串替换
|
||||||
if (!empty($this->replace)) {
|
if (!empty($this->replace)) {
|
||||||
$content = str_replace(array_keys($this->replace), array_values($this->replace), $content);
|
$content = strtr($content, $this->replace);
|
||||||
}
|
}
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user