登录

在模板分离前新建基类,为什么引用时网页无法显示

index.php

<?php

namespace app\index\controller;

use  app\index\controller\Base;

class Index extends Base

{

    public function index()

    {

       return $this-> view ->fetch();   }

}

基类

<?php

namespace app\index\controller;

use  think\controller;

class Base extends controller

{


}


# PHP
致明 致明 1656 天前 850 次浏览

全部回复(1) 我要回复

  •     Longinquity。

        Longinquity。2019-09-17 09:05:58

    看你的视图是否有 index文件夹下index.html

    回复
    0
  • 取消 回复 发送