视图 fetch(参数1,参数2,参数3,参数4) 参数1(字符串):模板渲染 参数2(数组):模板赋值 参数3(数组):模板替换 参数4(数组): 模板赋值 controller/index.php <?php namespace app\index\controller; class Index extends \think\Controller { public function index() { // 模板变量赋值 $this->assign('name','ThinkPHP'); $this->assign('email','thinkphp@qq.com'