> 一. 未引入視圖驅(qū)動(dòng)直接渲染模板 ```php <?php namespace app\controller; use app\BaseController; class Index extends BaseController { public function index() { return view(); } } ``` > 二. 拋出錯(cuò)誤:不支持驅(qū)動(dòng) ![](https://img.itqaq.com/art/content/21e1328fb8c6e4d31e8abfcdad95ef97.png) > 三. 解決錯(cuò)誤:引入視圖驅(qū)動(dòng) ![](https://img.itqaq.com/art/content/58f94c2de3bd0adbdc26671f59ff35c1.png) > 四、拋出的錯(cuò)誤不再是驅(qū)動(dòng)不支持的錯(cuò)誤,模板文件不存在,創(chuàng)建相應(yīng)模板即可 ![](https://img.itqaq.com/art/content/f4121ab6099e4821f85fd53314dd3da4.png)