- 论坛徽章:
- 0
|
什么意思?我的代码写错了?还有就是我的php是5.1.4
就是你提供下载的官方网站下下来的就三个.php的文件下面是其中之一。我的另外两个文件还用改什么吗?
<?php
/**
* SmartTemplate Class
*
* 'Compiles' HTML-Templates to PHP Code
*
*
* Usage Example I:
*
* $page = new SmartTemplate( "template.html" );
* $page->assign( 'TITLE', 'TemplateDemo - Userlist' );
* $page->assign( 'user', DB_read_all( 'select * from ris_user' ) );
* $page->output();
*
* Usage Example II:
*
* $data = array(
* 'TITLE' => 'TemplateDemo - Userlist',
* 'user' => DB_read_all( 'select * from ris_user' )
* );
* $page = new SmartTemplate( "template.html" );
* $page->output( $data );
*
*
* @author Philipp v. Criegern philipp@criegern.com
* @author Manuel 'EndelWar' Dalla Lana endelwar@aregar.it
* @version 1.2.1 03.07.2006
*
* CVS ID: $Id: class.smarttemplate.php,v 1.7 2006/07/02 22:17:15 endelwar Exp $
*/
class SmartTemplate
{
/**
* Whether to store compiled php code or not (for debug purpose)
*
* @access public
*/
var $reuse_code = true;
/**
* Directory where all templates are stored
* Can be overwritten by global configuration array $_CONFIG['template_dir']
*
* @access public
*/
var $template_dir = 'templates/';
/**
* Where to store compiled templates
* Can be overwritten by global configuration array $_CONFIG['smarttemplate_compiled']
*
* @access public
*/
var $temp_dir = 'templates_c/';
/**
* Temporary folder for output cache storage
* Can be overwritten by global configuration array $_CONFIG['smarttemplate_cache']
*
* @access public
*/
var $cache_dir = 'templates_c/';
/**
* Default Output Cache Lifetime in Seconds
* Can be overwritten by global configuration array $_CONFIG['cache_lifetime']
*
* @access public
*/
var $cache_lifetime = 600;
/**
* Temporary file for output cache storage
*
* @access private
*/
var $cache_filename; |
|