search

Home  >  Q&A  >  body text

Why can’t the web page be displayed when a new base class is created before template separation?

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

{


}


致明致明1964 days ago1148

reply all(1)I'll reply

  •     Longinquity。

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

    Check if your view has index.html in the index folder

    reply
    0
  • Cancelreply