Home > Article > PHP Framework > Why doesn't Yii have a template engine?
Yii Framework is a component-based, high-performance PHP framework for developing large-scale web applications. YII does not have a template engine, but you can add it yourself in the form of an extension, but YII does not recommend you do this.
PHP itself is the best template engine (currently), You can get a smarty, or something else. It's fundamentally anti-human. There is already a lot to learn in PHPer, and you still have to master a set of products that you may no longer use after changing jobs.
The second thing is that when debugging, because the template engine has to be compiled into PHP eventually, when the program reports an error, it is difficult for you to locate the specific error location immediately. Secondly, you have to often read the manuals of these template engines to see what parameters this loop template has.
For example, there is a domestic software with a template tag that executes SQL statements. Since the product itself is not well written, problems will arise when writing SQL statements containing the symbols < >.
PHP Chinese website has a large number of free Yii introductory tutorials, everyone is welcome to learn!
The above is the detailed content of Why doesn't Yii have a template engine?. For more information, please follow other related articles on the PHP Chinese website!