都市有情人
(都市有情人)
中级会员
 
中级会员
UID 63393
精华
0
积分 250
帖子 205
金钱 250 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2005-2-25
状态 离线
|
[广告]: q
m
在phplib template请问这个是什么错误
1.php代码:
<?
include("template.php");
$xx=array("xx1","xx2","xx3");
$xxx=array("xxx1","xxx2","xxx3");
$t=new template(".");
$t->set_file("index", "1.htm");
//第一层开始
$t -> set_block("index", "row", "a");//设置第一层的block
for($i=0;$i<3;$i++){
$t->set_var(array("master_list"=> $xx[$i]));//设置第一层的变量
//第二层开始
$t->set_block("row", "s_row", "b");//设置第二层的block
for($j=0;$j<3;$j++){
$t->set_var(array("sub_list"=> $xxx[$j]));//设置第二层的变量
$t->parse("b","s_row",true);
}
//第二层结束
$t->parse("a","row",true);
}
//第一层结束
$t->parse("indexout","index");
$t->p("indexout");
?>
1.htm代码:
<style>
#row{
margin:20px 0 0 0;
}
</style>
<!-- BEGIN row -->
<div id="row">父列表:{master_list}</div>
<!-- BEGIN s_row -->
<div id="s_row">子列表:{sub_list}</div>
<!-- END s_row -->
<!-- END row -->
在以上代码运行时//出现以下错误//请问是什么错误:
Template Error: set_root: ts1 is not a directory.
Halted.
请问以上这样的错误应该怎样解决呢?
|
|