From 23e085ecf1320b3fe27439fd9f08d09c3a22337c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 30 Apr 2016 15:32:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96View=E7=B1=BB=E5=AF=B9?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9=E7=9A=84=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/View.php b/library/think/View.php index 8ff888ab..31ccd22d 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -119,7 +119,7 @@ class View APP_HOOK && Hook::listen('view_filter', $content); // 允许用户自定义模板的字符串替换 if (!empty($this->replace)) { - $content = str_replace(array_keys($this->replace), array_values($this->replace), $content); + $content = strtr($content, $this->replace); } return $content; }