Several commonly used PHP template engines

Source: Internet
Author: User
Tags new set pear php compiler php template xml parser smarty template zend

The PHP template engine is widely used for separating templates and layouts.

Using the PHP template engine, you can make the site's peacekeeping updates easy, create a better development environment, and make development and design work easier to combine.

It must also have some shortcomings, such as performance (most PHP template engines do better in this regard) and need to learn new syntax (occasionally).

Speaking of which, using a template engine does not necessarily suit every project. If a website has only a few pages, it is probably not needed. If you are developing a portal, e-commerce site, or other Web application, you can use it to improve the development process.

This is the 19 php template engine, they all have the function of friendship, and in continuous development.

Click on the picture or title name to download

Smarty

Smarty is the official PHP template, the previous website address is http://smarty.php.net/, because it is too popular, after the new domain name is enabled http://www.smarty.net/.

Smarty is a php template engine. More precisely, it separates logic programs from external content and provides an easy-to-manage approach. You can describe different roles for both the application and the artist, because in most cases they cannot be the same person.

One of the features of Smarty is "template compilation". This means that Smarty read the template files and then use them to create PHP scripts. These scripts are created and will be executed later. Therefore, the parsing of template files is not spent, and each template can enjoy such as Zend Accelerator (http://www.zend.com) or PHP accelerator (http://www.php-accelerator.co.uk). Such a PHP compiler cache solution.

Dwoo

Dwoo is a PHP5 template engine. Compatible with the Smarty template, it is completely rewritten on the basis of the smarty syntax. Supports extending its functionality through plugins.

Savant

Savant is a powerful but lightweight object-oriented PHP template engine. Unlike its templating system, Savant does not compile the template into PHP by default, but instead uses PHP itself as its template language so you don't need to learn a new set of tagging systems. Savant has an object-oriented template plug-in system and an output filter that lets you quickly add new behavior to it.

Template Blocks

The template Blocks is a visual template engine L, which is lightweight, flexible, and highly extensible.

You can generate any static content for any extension and you can use the popular extension suffix Kunming National Defense Road Hospital, such as. html,. htm, or. php. They will all load the same content.

Open Power Template

The new open Power Template contains a built-in XML parser that can fully understand the structure of your HTML code. It can find unclosed tags in the structure and perform complex actions. For better performance, each template is compiled into PHP code so that it executes faster and can be accelerated using the PHP accelerator, and the results will be cached.

Tinybutstrong

Tinybutstrong (TBS) is a PHP template engine that lets you cleanly separate PHP scripts from HTML files. TBS is designed to use any visual HTML editor to write TBS HTML template pages.

Rain TPL

Easy to use and install engine with 6 tags, 3 php functions and 2 PHP classes. Rain TPL's WYSIWYG is very friendly, you can use the Img/cs s relative path, they will be converted to the correct server path.

Phptal

phptal is a ZPT php execution. In short, phptal is a xml/xhtml template library under PHP.

PHP Template Engine

This template engine uses PHP, not a template scripting language.

It has a simple user authentication, session and cookie system.

Template Lite

Template Lite is a very fast and very small HTML template engine. The engine supports most of the features and filters that the Smarty template engine has.

Vte–vivvo Template Engine

The initial creation of the VTE was used for the Vivvo CMS, but it was released for free, and was a lightweight, easy-to-use, powerful and extensible template engine. It can do recursion, object requirements, arrays, but still keep in a single volume, less than 1000 lines of code! The language of the VTE is based on XML, including tags and attributes.

xtemplate

Xtemplate is a template engine for PHP. It allows the HTML code to be stored separately from the PHP code. Xtemplate contains a number of useful features such as nested blocks, various types of interpolation variables. The code is very concise and optimized.

vlibtemplate

A fast, versatile templating system that contains a cache and Debug class.

Php-sugar

It smarty have the same spirit. A flexible assembler engine that makes expressions similar to the use of PHP itself. It also has a clean, easy-to-understand syntax, and the output is HTML-escaped.

FXL Template

FXL Template is an easy-to-use templating engine that contains all the features of an engine system.

Blitz Templates

Blitz Templates is a fast template engine for Kunming National Defense Road Hospital.

Vemplator

With only 220 lines of code, vemplator provides:

      • Conditional statements: if/else and switch declarations
      • Dot mark user variable (customer.name)
      • Associative and numeric arrays (row[0] and rows[1][' name ')
      • For-each looping over arrays (associative and numeric indexes)
      • Includes (included template is resolvable and cache detached)
Template Engines under PEAR

4 PEAR packages on templating:

        • html_temp Late_flexy
        • html_template_it
        • Span style= "font-family: Song body; font-size:12px; " >html_template_phplib
        • html_template_sigma

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.