- 论坛徽章:
- 0
|
以前用的是Fasttemplate模板是这样写的:
<?php
include_once("data/include/common.php");
include_once("data/include/template.php");
$tpl = new FastTemplate( "./templates/$template");
$tpl->define(array('main' => "index.tpl",'head' => "head.tpl",'foot' => "foot.tpl"));
$tpl->assign('sitename',$sitename);
$tpl->assign('copyright',$copyright);
$tpl->assign('line',$line);
$tpl->assign('search',$search);
$tpl->assign('version',$version);
$tpl->parse('HEAD', "head");
$tpl->parse('FOOT', "foot");
$tpl->assign('announce',$announce);
$tpl->assign('top',$top);
$tpl->assign('commend',$commend);
$tpl->assign('hot',$hot);
$tpl->assign('new',$new);
$tpl->assign('comment',$comment);
$tpl->assign('link',"$link");
$tpl->assign('listart',$listart);
if((bool)$isopen_forum)include_once("data/include/forum.php");
$tpl->assign('templatedir',"");
$tpl->assign('template',$template);
$tpl->parse('MAIN', "main");
$tpl->FastPrint('');
?>
我现在用的是smarttemplate模板我这样写的:
<?php
include_once("config/common.php");
//include_once("config/template.php");
include_once( "../class/class.smarttemplate.php");
$tpl = new SmartTemplate("../templates/$template/");
$tpl->array(array('main' => "index.tpl",'head' => "head.tpl",'foot' => "foot.tpl"));
$tpl->assign('sitename',$sitename);
$tpl->assign('copyright',$copyright);
$tpl->assign('line',$line);
$tpl->assign('search',$search);
$tpl->assign('version',$version);
//$tpl->parse('HEAD', "head");
//$tpl->parse('FOOT', "foot");
$tpl->assign('announce',$announce);
$tpl->assign('top',$top);
$tpl->assign('commend',$commend);
$tpl->assign('hot',$hot);
$tpl->assign('new',$new);
$tpl->assign('comment',$comment);
$tpl->assign('link',"$link");
$tpl->assign('listart',$listart);
if((bool)$isopen_forum)include_once("config/forum.php");
$tpl->assign('templatedir',"");
$tpl->assign('template',$template);
//$tpl->parse('MAIN', "main");
//$tpl->FastPrint('');
$tpl->output();
?>
出现的警告是这样的:
Warning: include_once(../class/class.smarttemplate.php) [function.include-once]: failed to open stream: No such file or directory in H:\APMServ5.2.0\www\htdocs\phpercms0\index.php on line 4
Warning: include_once() [function.include]: Failed opening '../class/class.smarttemplate.php' for inclusion (include_path='.;C:\php5\pear') in H:\APMServ5.2.0\www\htdocs\phpercms0\index.php on line 4
Fatal error: Class 'SmartTemplate' not found in H:\APMServ5.2.0\www\htdocs\phpercms0\index.php on line 47
请知道的给点帮助::
在线等.... |
|