<?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');
}
}
>只要是继承ba最佳答案