Thinkphp5.0 控制器向视图view的赋值 方式一(使用fetch()方法的第二个参数赋值): <?php namespace app\index\controller; use think\Controller; class Index extends Controller { public function study_view(){ return $this->fetch('study_view',[ 'id' => 1, 'name' => 'li lei', 'a
一. 继承Controller类 <?php namespace app\index\controller; use http\Params; use think\Config; use think\Controller; use think\Request; import('filter', APP_PATH . 'common', ".php"); class Index extends Controller { /** * @param Request $request *