Home > Backend Development > PHP Tutorial > New template processing class, if you are interested, you can try it_PHP tutorial

New template processing class, if you are interested, you can try it_PHP tutorial

WBOY
Release: 2016-07-20 11:03:44
Original
890 people have browsed it

The main features of pfcTemplate
1. High efficiency
Because the program does not use regular expressions to analyze variables and blocks, but uses PHP's built-in string
processing function, so the efficiency may be slightly higher Compared with similar products
2. Ease of use
To use this class, you only need to simply create a class instance-> add files-> set variables/blocks-> [parse if there is a block]
-> It can be completed by parsing the file. Use common naming methods and provide easy-to-understand API interface methods.
3. Multi-level block processing
A lot can be achieved through the multi-level block processing function of the program Complex effects can be nested at unlimited levels (machine performance allows)
4. Templates that can be processed from multiple sources
Templates do not have to be made into files, they can be from databases or other sources.
$str = read_template_string();
$tpl->set_string('handle1', $str);
5. Variable customizability
The identifiers in the template can be adjusted by yourself.
For example: customize the identifier of a simple variable to "{/var

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445255.htmlTechArticlepfcTemplate Main features 1. High efficiency because regular expressions are not used when analyzing variables and blocks in the program. And use PHP's built-in string processing function to do it, so the efficiency may be...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template