Thinkphp5頁面加載的三種方式:
方式一、系統函數
public function index(){
return view();
}
方式二、系統view類
public function index(){
return $view->fetch();
}
3、通過Controller
// 需要控制器繼承系統類use think\Controller;
class Index extends Controller
public function index(){
return $this->fetch();
}