多模块取模板的问题[已解决]

浏览:400 发布日期:2017/01/16 分类:ThinkPHP5专区
原因是Admin目录下的index.html文件未放入view/Index目录下,直接放在了view目录下

我在application下建了两个模块Admin、index,在两个模块下均建立controller/Index.php文件和view/Index/index视图文件,在controller/Index.php文件中均定义

class Index extends Controller
{
public function index()
{
return $this->fetch();
}

}

在浏览器中访问http://localhost/index.php/Index/index/index显示正常,
访问http://localhost/index.php/Admin/index/index报错:
在admin模块中如果不用return $this->fetch();而用return 'aaa';则显示正常
模板文件不存
在:C:\myweb\thinkphp\public/../application/admin\view\index\index.html
最佳答案
评论( 相关
后面还有条评论,点击查看>>