#1 gnuser
文件结构:(1)controller/bbs.php代码如下
class bbs extends spController{
public function index(){
$user=spClass("user");
$this->user_sum=$user->findCount();
$bokes=spClass("bokes");
$this->bokes_sum=$bokes->findCount();
$tpl=$this->spArgs("tpl","default/bbs");
$this->display("{$tpl}/index.html");
}
}
(2)tpl/default/bbs/index.html代码:
<{include file="/default/header.html"}>
(引用了同目录下的header.html文件)
输出结果如下图:
图1
顶上多了一行
当把
$user=spClass("user");
$this->user_sum=$user->findCount();
$bokes=spClass("bokes");
$this->bokes_sum=$bokes->findCount();
去掉后,输出结果如下图:

图2
即使把header.html的代码放到index.html中,结果也如图1.
请问有没有人遇到过这样的情况,如果遇到过,有什么办法可以解决?谢谢
2011-05-28 08:14:52