⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 我写的php模版类,调用方法简单,支持if else include之类的标签, 可以包含扩展函数,整个模版文件没有外部include和require,减少io操作, 加载三个模版变量,两个数组变
💻
字号:

[Lightemplate]

Copyright (c) 2009 Troy

Class name: Lightemplate
Run environment on php5.*
Project owners and author Troy
Code license: GNU General Public License v3
Email list:
    ooofox@msn.com
Created on:2009/5/1
You need setting an array, when instance this class.
    $tempConf['templateDir'] setting template files path for template class
    $tempConf['templateCompiledDir'] save compile file of template
    $tempConf['templateExtDir'] template extension path
    $tempConf['templateFileSuffix'] template suffix name, default is .tpl


The example for config:
$tempconf = array('templateDir'=>'./Tpl/',
                          'templateCompiledDir'=>'./Temp/Tpl_Compiled/',
                          'templateFileSuffix'=>'.tpl',
                          'templateExtDir'=>'./Common/smarttemplate_extensions/');


if your run environment is php5.3, because php5.3 support to call a method on instance variable.
so you should be instance an object, then use this instance variable to call a method of lightemplate.

The example for running an instance:
<?php
$t = new Lightemplate($tempconf);
$t->setFile('index');
$t->assign('test','hello world');
$t->output();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -