当前位置: 动力学知识库 > 问答 > 编程问答 >

PHP error "Call to a member function on a non-object"

问题描述:

This question already has an answer here:

  • Call to a member function on a non-object

    4 answers

网友答案:

Your BaseDatabase::IDatabase should be defined as protected, not private, for it to be available from your Mysql extension.

Or you could use $this->set_database_behavior(new MysqlQuery()); instead of $this->IDatabase = new MysqlQuery(); in your Mysql::__construct()

分享给朋友:
您可能感兴趣的文章:
随机阅读: