Blitz templates 最快的PHP模板引擎
簡介:
Blitz templates 是一個用C語言開發(fā)的快速的PHP模板引擎,它是作為一個PHP的擴(kuò)展功能。它開始作為一個php_templates更換,但發(fā)展到更多的工作。它是基于可擴(kuò)展的模板控制器(自定義視圖類在PHP )和簡單的邏輯 。基準(zhǔn)測試表明,這是最快的一個PHP的模板引擎,使Web應(yīng)用程序更接近于一個聰明的MVC 結(jié)構(gòu)模型,最大從您的代碼分離出HTML。 這是專為大高負(fù)荷的有許多復(fù)雜的演示文稿的邏輯的互聯(lián)網(wǎng)項(xiàng)目。
下圖是幾個模板的性能測試結(jié)果:
示例模板代碼:
index.html
index.html
Html代碼
<html>
<head><title>{{ $title }}</title></head>
<body>
{{ include('header.tpl') }}
{{ list_news() }}
{{ include('footer.tpl') }}
</body>
</html>
index.php
<?php
$view = new Blitz('index.html');
function list_news(){
....
}
$view -> parse();
?>
下載地址: http://sourceforge.net/projects/blitz-templates/files/
- Springboot讀取templates文件html代碼實(shí)例
- 深入淺析springboot中static和templates區(qū)別
- SpringBoot中關(guān)于static和templates的注意事項(xiàng)以及webjars的配置
- SpringBoot用JdbcTemplates訪問Mysql實(shí)例代碼
- AngularJs Understanding Angular Templates
- 詳解Python的Django框架中的templates設(shè)置
- asp.net使用jquery模板引擎jtemplates呈現(xiàn)表格
- Springboot訪問templates html頁面過程詳解
相關(guān)文章
php smarty截取中文字符亂碼問題?gb2312/utf-8
一般網(wǎng)站頁面的顯示都不可避免的會涉及子字符串的截取,這個時候truncate就派上用場了,但是它只適合英文用戶,對與中文用戶來說,使用 truncate會出現(xiàn)亂碼2011-11-11
php Http_Template_IT類庫進(jìn)行模板替換
php Http_Template_IT模板替換實(shí)現(xiàn)代碼2009-03-03

