<?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();
}
}
?>结果模板输出空 最佳答案