免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1617 | 回复: 1
打印 上一主题 下一主题

改用模板出现问题...求助...在线等... [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-24 06:32 |只看该作者 |倒序浏览
以前用的是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


请知道的给点帮助::
在线等....

论坛徽章:
0
2 [报告]
发表于 2006-12-24 09:18 |只看该作者
include_once( "../class/class.smarttemplate.php");

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

没找到../class/class.smarttemplate.php 路径不对
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP