Oct 28

FastTemplate PHP模板引擎 不指定

shuguang , 15:43 , 模板引擎 , 评论(0) , 引用(0) , 阅读(11217) , Via 本站原创 | |
程序名称:FastTemplate
开发者/组织名称:CPAN
运行环境:php
官方网站:http://www.thewebmasters.net
下载地址:http://www.thewebmasters.net/php/FastTemplate.phtml
文章来源:http://www.osphp.com.cn
程序介绍:
一个简单的变量插值模板类,它分析你的模板,把变量的值从HTML代码中分离处理

请下载附件中的源码,不要直接复制 (已下载 次)

//PHP开源代码


What is a template?
A template is a text file with variables in it. When a template is parsed, the variables are interpolated to text. (The text can be a few bytes or a few hundred kilobytes.) Here is a simple template with one variable ('{NAME}'):


Hello {NAME}.  How are you?

When are templates useful?

Templates are very useful for CGI programming, because adding HTML to your PHP code clutters your code and forces you to do any HTML modifications. By putting all of your HTML in seperate template files, you can let a graphic or interface designer change the look of your application without having to bug you, or let them muck around in your PHP code.

Why use FastTemplate?

Speed

FastTemplate parses with a single regular expression. It just does simple variable interpolation (i.e. there is no logic that you can add to templates - you keep the logic in the code). That's why it's has 'Fast' in it's name!
//OSPHP.COm.CN


Flexibility

The API is robust and flexible, and allows you to build very complex HTML documents/interfaces. It is also completely written in PHP and (should) work on Unix or NT. Also, it isn't restricted to building HTML documents -- it could be used to build any ascii based document (postscript, XML, email - anything).

What are the steps to use FastTemplate?

The main steps are:


    1. define
    2. assign
    3. parse
    4. FastPrint

These are outlined in detail in CORE METHODS below.
收藏本文到网摘: 添加到“Google书签” 添加到“Yahoo收藏” 添加到“QQ书签” 搜狐网摘 添加到“百度搜藏” 添加到“新浪ViVi收藏夹” 添加到“Del.icio.us” 添加到“365天天网摘” 添加到“天极网摘” 我摘·网摘·网络书签 添加到“POCO网摘” YouNote网摘 添加到“和讯网摘” 添加到“Bolaa博客收录中心” 添加到“igooi网摘” 添加到“天下图摘”
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容
  • 中查看更多“FastTemplate PHP模板引擎”相关内容

  • 最后编辑: shuguang 编辑于2007/12/05 14:35
    发表评论

    昵称

    网址

    电邮

    打开HTML 打开UBB 打开表情 隐藏 记住我 [登录系统] [注册]