有点头续了,不过不知道怎么不行,整页空白$cond="";
$b=new books;
require("template.inc");
//设置模板调用的目录:
$t=new Template("template/");
//调用test.html,并将期命名为index
$t->set_file("inde","index.html");
//定义一个index中的块list,命名为ml(ml随便)
$t->pparse("mout","inde");
$t->set_block("inde","list","ml");
$all_books=books::_query($cond); //取出??
foreach($all_books as $item){
$t->set_var("username",$item->username);
$t->set_var("ucontent",$item->ucontent);
$t->set_var("udate",$item->udate);
$t->set_var("rcontent",$item->rcontent);
$t->set_var("rdate",$item->rdate);
$t->parse("ml","list",true);
}
$t->pparse("mout","inde");
$b=new books;
require("template.inc");
//设置模板调用的目录:
$t=new Template("template/");
//调用test.html,并将期命名为index
$t->set_file("inde","index.html");
//定义一个index中的块list,命名为ml(ml随便)
$t->pparse("mout","inde");
$t->set_block("inde","list","ml");
$all_books=books::_query($cond); //取出??
foreach($all_books as $item){
$t->set_var("username",$item->username);
$t->set_var("ucontent",$item->ucontent);
$t->set_var("udate",$item->udate);
$t->set_var("rcontent",$item->rcontent);
$t->set_var("rdate",$item->rdate);
$t->parse("ml","list",true);
}
$t->pparse("mout","inde");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货