Heim  >  Artikel  >  Backend-Entwicklung  >  thinkphp中开启smarty是否不能使用默认的模板布局?

thinkphp中开启smarty是否不能使用默认的模板布局?

WBOY
WBOYOriginal
2016-06-06 20:16:251207Durchsuche

我在配置文件中同时开启了smarty和layout.
但是我的模板无法正常渲染,页面上只有控制器display的内容。
而当我关闭了smarty之后渲染正常,请问模板布局和smarty是否无法一起使用,还是我的方法有问题!!?

回复内容:

我在配置文件中同时开启了smarty和layout.
但是我的模板无法正常渲染,页面上只有控制器display的内容。
而当我关闭了smarty之后渲染正常,请问模板布局和smarty是否无法一起使用,还是我的方法有问题!!?

thinkphp自带的模板引擎才能用layout
smarty有对应的include解决方案
具体参考:http://www.smarty.net/docs/zh_CN/language.function.include.tpl

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn