为了账号安全,请及时绑定邮箱和手机立即绑定

return $this->fetch(); 致命错误: Call to a member function fetch() on null

致命错误: Call to a member function fetch() on null

   protected function fetch($template = '', $vars = [], $replace = [], $config = [])    {        return $this->view->fetch($template, $vars, $replace, $config);    }

正在回答

3 回答

有可能多了 _construct()方法

0 回复 有任何疑惑可以回复我~
#1

python_phplinux

我也报这样的错,确实是写了这个_construct()魔术方法,注释掉后可以访问到页面了这是为什么呢?
2018-05-24 回复 有任何疑惑可以回复我~

Index.php文件中

<?php

namespace app\index\controller;

use think\Controller;

class Index extends Controller

{


0 回复 有任何疑惑可以回复我~

帮顶。。

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

return $this->fetch(); 致命错误: Call to a member function fetch() on null

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号