Base类继承失败问题求大佬解答

浏览:585 发布日期:2019/04/01 分类:求助交流 关键字: Tp5 Base
base.php的代码是这样的<?php
namespace app\index\controller;
use think\Controller;
class Base extends Controller{
}    
>
Index.php的代码是这样的<?php
namespace app\index\controller;
use think\Base;
class Index extends Base
{
    public function index()
    {              
        return $this -> fetch('index:index');
    }
}
>
我只要把Index.php的代码改成下面这样就可以运行<?php
namespace app\index\controller;
use think\Controller;
class Index extends Controller
{
    public function index()
    {              
        return $this -> fetch('index:index');
    }
}
>
只要是继承base就报错 改回Controller就正常 着是为什么啊
最佳答案
评论( 相关
后面还有条评论,点击查看>>