diff --git a/library/think/Template.php b/library/think/Template.php
index 315a0e28..5a05c1cb 100644
--- a/library/think/Template.php
+++ b/library/think/Template.php
@@ -404,9 +404,9 @@ class Template
}
$parseStr = str_replace('[' . $k . ']', $v, $parseStr);
}
+ $content = str_replace($match[0], $parseStr, $content);
// 再次对包含文件进行模板分析
$funReplace($parseStr);
- $content = str_replace($match[0], $parseStr, $content);
}
unset($matches);
}
diff --git a/tests/thinkphp/library/think/include.html b/tests/thinkphp/library/think/include.html
index ac622e75..e01ae9ef 100644
--- a/tests/thinkphp/library/think/include.html
+++ b/tests/thinkphp/library/think/include.html
@@ -1 +1,2 @@
-
\ No newline at end of file
+
+{include file="include2" /}
\ No newline at end of file
diff --git a/tests/thinkphp/library/think/include2.html b/tests/thinkphp/library/think/include2.html
new file mode 100644
index 00000000..6d4dd4be
--- /dev/null
+++ b/tests/thinkphp/library/think/include2.html
@@ -0,0 +1 @@
+include2
\ No newline at end of file
diff --git a/tests/thinkphp/library/think/templateTest.php b/tests/thinkphp/library/think/templateTest.php
index b1522197..e4ebd77d 100644
--- a/tests/thinkphp/library/think/templateTest.php
+++ b/tests/thinkphp/library/think/templateTest.php
@@ -266,9 +266,11 @@ EOF;