继承控制器,变量值未传递

浏览:484 发布日期:2014/05/20 分类:求助交流
在HomeController.class.php中给变量赋值,<?php
namespace Home\Controller;
use Think\Controller;
class HomeController extends Controller {
    protected function _initialize(){
        $this->assign("TimeStamp", time());
    }
}
?>
IndexController.class.php继承HomeController.class.php,<?php
namespace Home\Controller;
class IndexController extends HomeController {
    public function index(){
        $this->display();
    }
}
?>
结果模板输出空
最佳答案
评论( 相关
后面还有条评论,点击查看>>