摘要:<?php namespace app\index\controller; use think\facade\View; use think\Controller; class Index extends Controller { public function demo() {
<?php
namespace app\index\controller;
use think\facade\View;
use think\Controller;
class Index extends Controller
{
	public function demo()
	{
	    $name = 'skywalker';
	    return view('demo',['name'=>$name]);
	}
	//模板赋值
	public function demo1()
	{
	    $this->view->name = 'skywalker';
	    return $this->view->fetch();
	}{//基础模板}
{block name = "header"}
{include file="header文件路径"}
{/block}
{block name="footer"}
{include file="footer文件路径"}
{/block}
						批改老师:韦小宝批改时间:2018-12-29 15:18:28		
						
老师总结:写的还是很不错的!简洁!课后记得多研究研究!					
 
                 
 
 
  
            