search

Home  >  Q&A  >  body text

Render login template





<?php

namespace app\index \controller;

use app\index\controller\Base;(Import 'app\index\controller\Base' is not necessaryUsage of statement use was not found.)class Index extends Base
{
public function index()
{
return $this -> view -> fetch();
}
}

Under the controller An error occurred in index.php. Import 'app\index\controller\Base' is not necessary, Usage of statement use was not found.

is the same as the video code, the login template cannot be rendered, and all the methods of the Q&A community have been changed. It doesn't work even if I try it

com_batcom_bat2467 days ago1570

reply all(5)I'll reply

  • com_bat

    com_bat2018-03-13 20:28:52

    The problem has been solved because the pseudo-static under Apache is not turned on (under the .htaccess file)# RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L) is changed to RewriteRule ^(.* )$index.php? /$1 [QSA,PT,L) can

    reply
    0
  • Lipuor

    There are only three words "deny from all" in my .htaccess file. . . How to change this

    Lipuor · 2019-02-23 12:21:26
  • sky

    sky2018-03-13 18:41:41

    Namespace error!

    reply
    0
  • 韦小宝

    韦小宝2018-03-12 17:26:37

    Did you write Base?

    reply
    0
  • com_bat

    Base was written by me

    com_bat · 2018-03-12 17:27:43
  • com_bat

    com_bat2018-03-12 00:54:02

    Teacher, and also changed //use app\index\controller\Base; to Import 'app\index\controller\Base'; also doesn't work

    reply
    0
  • Cancelreply