> 一. 未引入视图驱动直接渲染模板 ```php <?php namespace app\controller; use app\BaseController; class Index extends BaseController { public function index() { return view(); } } ``` > 二. 抛出错误:不支持驱动 ![](https://img.itqaq.com/art/content/21e1328fb8c6e4d31e8abfcdad95ef97.png) > 三. 解决错误:引入视图驱动 ![](https://img.itqaq.com/art/content/58f94c2de3bd0adbdc26671f59ff35c1.png) > 四、抛出的错误不再是驱动不支持的错误,模板文件不存在,创建相应模板即可 ![](https://img.itqaq.com/art/content/f4121ab6099e4821f85fd53314dd3da4.png)