how to use Smarty better with PHP?

前端 未结 11 1805
孤街浪徒
孤街浪徒 2021-01-02 17:50

I found that using Smarty with PHP, sometimes extra time will need to be used for

1) using quite different syntax than PHP itself
2) need to check small cases, b

11条回答
  •  旧时难觅i
    2021-01-02 18:07

    I don't like templating engines. I find them very lossy and resource-intensive for PHP.

    With MediaWiki, around version 1.6.x we backed off using Smarty by default and just use PHP's built-in templating, with a great improvement in performance.

    I've found that most of what people want to do with a templating system (add links, change colors, remove text or sections of the page) are better done with a simple system of event hooks.

    Laconica, the open microblogging platform, doesn't do any templating by default. We have a plugin for people who are crazy for templating.

提交回复
热议问题