在控制器中controller
public function school()
{
// 给模板变量name赋值
$id=input(‘get.id’);//页数
$this->assign(‘id’,$id);
//多个参数
$this->assign([
‘name’ =>’thinkphp’,
’email’=>’thinkphp@qq.com’
]);
return $this->fetch();
}
在控制器中controller
public function school()
{
// 给模板变量name赋值
$id=input(‘get.id’);//页数
$this->assign(‘id’,$id);
//多个参数
$this->assign([
‘name’ =>’thinkphp’,
’email’=>’thinkphp@qq.com’
]);
return $this->fetch();
}