Maison  >  Article  >  développement back-end  >  thinkphp中开启smarty是否不能使用默认的模板布局?

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

WBOY
WBOYoriginal
2016-06-06 20:16:251207parcourir

我在配置文件中同时开启了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

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn