Home > Backend Development > PHP Tutorial > Blitz templates:最快的PHP模板引擎_PHP

Blitz templates:最快的PHP模板引擎_PHP

WBOY
Release: 2016-06-01 12:20:35
Original
1108 people have browsed it

简介:

Blitz templates 是一个用C语言开发的快速的PHP模板引擎,它是作为一个PHP的扩展功能。它开始作为一个php_templates更换,但发展到更多的工作。它是基于可扩展的模板控制器(自定义视图类在PHP )和简单的逻辑 。基准测试表明,这是最快的一个PHP的模板引擎,使Web应用程序更接近于一个聪明的MVC 结构模型,最大从您的代码分离出HTML。 这是专为大高负荷的有许多复杂的演示文稿的逻辑的互联网项目。

下图是几个模板的性能测试结果:

示例模板代码:

index.html

index.html

Html代码


{{ $title }}

{{ include('header.tpl') }}
{{ list_news() }}
{{ include('footer.tpl') }}

index.php

Php代码

  $view = new Blitz('index.html');
  function list_news(){
   ....
  }
  $view -> parse();
?>

 

Related labels:
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