Home Backend Development PHP Tutorial Several commonly used template engines in PHP_PHP tutorial

Several commonly used template engines in PHP_PHP tutorial

Jul 20, 2016 am 10:58 AM
html php code separation front end dynamic and engine template use of

Dynamic code and front-end code are completely separated. The template only contains pure front-end code (html, css) and identifiers that replace dynamic code. Pure dynamic code is written in the core, but there is a parameter that makes the code block correspond to the identifier in the template, and the two are matched through a parser. This parser is the template engine . The following introduces the template engines commonly used in PHP.

1. Smarty

Smarty is characterized by compiling templates into PHP scripts and then executing these scripts. Very fast and very flexible.

2. Heyes Template Class

A very easy-to-use, yet powerful and fast template engine that helps you separate page layout and design from code.

3. FastTemplate

A simple variable interpolation template class, which analyzes your template and separates the variable values ​​​​from the HTML code.

4. ShellPage

A simple and easy-to-use class that can make your entire website layout based on template files. Modifying the template can change the entire site.

5. STP Simple Template Parser

A simple, lightweight and easy-to-use template parsing class. It can assemble a page from multiple templates and output the resulting page to the browser or file system.

6. OO Template Class

A cash-oriented template class that you can use in your own program.

7. SimpleTemplate

A template engine that can create and structure websites. It can parse and compile templates.

8. bTemplate

A short but fast template class that allows you to separate PHP logic code from HTML decoration code.

9. Savant

A powerful and lightweight PEAR compatible template system. It is non-compiled and uses the PHP language itself as its template language.

10. ETS - easy template system

A template system that can reorganize templates using exactly the same data.

11. EasyTemplatePHP

A simple but powerful template system for your site.

12. vlibTemplate

A fast, versatile template system that includes a cache and debugging class.

13. AvanTemplate

A multi-byte safe template engine that takes up very little system resources. It supports variable substitution, and content blocks can be set to show or hide.

14. Grafx Software’s Fast Template

A modified version of the Fast Template system, which includes caching functionality, debugging console, and silence removal for assignment blocks.

15. TemplatePower

A fast, simple and powerful template class. Key features are nested dynamic block support, block/file inclusion support and showing/hiding unassigned variables.

16. TagTemplate

The functionality of this library is designed to work with template files while allowing you to retrieve information from HTML files.

17. htmltmpl: templating engine

A template engine suitable for Python and PHP. It is aimed at web application developers who want to separate code and design in their projects.

18. PHP Class for Parsing Dreamweaver templates

A simple class for parsing Dreamweaver templates, used in custom modules of Gallery 2 and WordPress.

19. MiniTemplator (Template Engine)

A compact template engine for HTML files. It has simple syntax for template variables and block definitions. Blocks can be nested.

20. Layout Solution

Simplify website development and maintenance. It has commonly used variables and page elements so that you don't need to repeat page layout work.

21. Cached Fast Template

It has been incorporated into FastTemplate, allowing you to cache template files and even cache different specifications on separate chunks of content.

22. TinyButStrong

A template engine that supports MySQL, Odbc, Sql-Server and ADODB. It contains 7 methods and two properties.

23. Brian Lozier’s php based template engine

Only 2K in size, very fast and object-oriented design.

24. WACT

A template engine that separates code from design.

25. PHPTAL

An XML/XHTML template library under PHP.

I hope that the summary of the above content can help you.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445731.htmlTechArticleDynamic code and front-end code are completely separated, and the template only contains pure front-end code (html, css) and substitute dynamic code The identifier of the code. Pure dynamic code is written in the core, but there is a...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1675
14
PHP Tutorial
1278
29
C# Tutorial
1257
24
PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

HTML: The Structure, CSS: The Style, JavaScript: The Behavior HTML: The Structure, CSS: The Style, JavaScript: The Behavior Apr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

Choosing Between PHP and Python: A Guide Choosing Between PHP and Python: A Guide Apr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Python: A Deep Dive into Their History PHP and Python: A Deep Dive into Their History Apr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Why Use PHP? Advantages and Benefits Explained Why Use PHP? Advantages and Benefits Explained Apr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

PHP's Impact: Web Development and Beyond PHP's Impact: Web Development and Beyond Apr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

The Future of HTML: Evolution and Trends in Web Design The Future of HTML: Evolution and Trends in Web Design Apr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

PHP vs. Python: Use Cases and Applications PHP vs. Python: Use Cases and Applications Apr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

See all articles