#1 stalker
class main extends spController{
//需要一个smarty对象的style属性
public function index(){
$this->display($this->style.'/'.$__controller.'/'.$__action.'.html');
}
}
2010-03-10 11:20:10
class main extends spController{
//需要一个smarty对象的style属性
public function index(){
$this->display($this->style.'/'.$__controller.'/'.$__action.'.html');
}
}
2010-03-10 11:20:10
2010-03-10 11:28:55
public function main extends spController{
public function __construct(){
$smarty = $this->getView();
$smarty->style = 'blue';
}
}
2010-03-10 16:06:17
2010-03-10 16:33:27
class main extends spController{
public function __construct(){
parent::__construct();
$smarty = $this->getView();
$smarty->style = 'blue';
}
public function index(){
echo $this->style;
}
}
2010-03-11 09:48:00
2010-03-11 10:22:36
2010-03-11 10:30:25
class main extends spController{
public function __construct(){
parent::__construct();
$this->style = 'blue';
}
public function index(){
echo $this->style;
}
}
2010-03-11 10:56:35
class main extends spController{这样可以了 但是在模板文件中使用变量没办法显示:
public $style = '';
public function __construct(){ parent::__construct();
$this->style = 'blue';
}
public function index(){
$this->display($this->style.'/'.$__controller.'/'.$__action.'.html');
}
}
2010-03-11 10:59:49
2010-03-12 11:01:56
2010-03-15 09:37:51
2010-03-15 10:03:00