php :Call to a member function assign() on null

版权声明:转载请注明原处,thanks~ https://blog.csdn.net/qq_41066340/article/details/84873962

使用场景:框架中 使用构造函数   __construct()

原因:新的构造函数覆盖父级构造函数,导致无法调用框架中包含的函数类

修改:控制器(子类)构造函数中增加父类继承

//构造函数
    public function __construct(){
        parent::__construct();
    }

猜你喜欢

转载自blog.csdn.net/qq_41066340/article/details/84873962