问题描述
限时送ChatGPT账号..最好/最容易为 PHP 集成模板系统的是什么,使用它有什么好处?
What's the best/easiest to integrate templating system for PHP, and what are the benefits of using one?
我目前根本不使用,我认为将内容与演示文稿分开可能会有所帮助.
I currently don't use one at all, and am thinking that it might help to seperate content from presentation a little more.
推荐答案
Smarty
我发现它快速、易于使用且易于安装(即使在共享托管环境中).它还不需要您使用验证 XHTML,这有时很方便(尽管我认为确实需要有效 XHTML 的模板引擎可能更快.)
Smarty
I've found it to be fast, easy to use, and easy to install (even in a shared-hosting environment). It also doesn't require that you use validating XHTML which is handy sometimes (although I think the template engines that do require valid XHTML are probably faster.)
将您的内容放在一个地方而在其他地方编写代码真是太好了.
It's really nice to have your content in one place and code somewhere else.
此外,您不仅限于 HTML.我使用 Smarty 生成了 XML 甚至 SQL.
Plus you're not limited to just HTML. I've used Smarty to generate XML and even SQL.
这篇关于什么是好的 PHP 模板系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论