Home>Article>PHP Framework> What is the difference between smarty and thinkphp
The difference between smarty and thinkphp is: smarty is a template engine written in PHP to separate PHP and HTML code; while thinkphp is an open source lightweight PHP framework that defines some rules and encapsulates some Operation, used for rapid development and improved efficiency.
The operating environment of this article: Windows 10 system, ThinkPHP version 5, Dell G3 computer.
Smarty
Smarty is a template engine written in PHP and is the most famous PHP template in the industry One of the engines. It separates logical code and external content, providing an easy-to-manage and use method to separate PHP code logic that is originally mixed with HTML code.
To put it simply, the purpose is to separate PHP programmers from front-end personnel, so that programmers change the logical content of the program without affecting the page design of the front-end personnel, and front-end personnel re-modify the page without affecting the program. Program logic, which is particularly important in multi-person collaboration projects.
thinkphp
ThinkPHP is an open source lightweight PHP framework born to simplify enterprise-level application development and agile WEB application development.
Difference
Smarty is a PHP template engine technology that separates PHP code and HTML code, allowing programmers and page designers to better manage their own modules.
Thinkphp is the framework. It defines some rules and encapsulates some common operations. You program according to the rules it has written, so that your work can be more efficient.
The template engine in thinkphp is smarty. thinkphp is a background framework for rapid program development. smarty is just a template engine used to separate php and html codes.
Recommended learning:《PHP video tutorial》
The above is the detailed content of What is the difference between smarty and thinkphp. For more information, please follow other related articles on the PHP Chinese website!