tp5 模型中获取不到数据 (在线等管理员回复)

浏览:794 发布日期:2018/01/22 分类:ThinkPHP5专区 关键字: 模型构造函数
// 设置当前模型的数据库连接
    protected $connection = [];

    public function __construct()
    {
        parent::__construct();
        $this->connection = config("db_company");
        $this->class=null;
    }
构造函数中加上“$this->class=null;”才能正常执行,去掉后报错
最佳答案
评论() 相关
后面还有条评论,点击查看>>