<?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();
}
}
控制器下index.php出现错误Import 'app\index\controller\Base' is not necessary,Usage of statement use was not found.
和视屏代码一样,渲染不了登陆模板,并且将问答社区的方法都试过了也不行
问题已解决,原因是Apache 下的伪静态未开启(.htaccess文件下)中# RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L)改为RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L)即可
命名空间错误!
Base你写了嘛
老师,而且还将//use appindexcontrollerBase;改为Import 'appindexcontrollerBase';也不行