What's the reason for reporting an error?
好想睡懒觉、
好想睡懒觉、 2018-02-26 11:25:12
0
3
1460

 Fatal error: Call to a member function query() on a non-object in E:\WWW\mvc\model\Db.php on line 70

好想睡懒觉、
好想睡懒觉、

reply all(2)
Don't cry

There may be something wrong with the way you call the database. Check your code and read the documentation

lge

Post the code and have a look

  • reply private function connect() { try{ //Configure data source DSN $dsn = "{$this->dbConfig['db']}:host={$this->dbConfig['host']}; port={$this->dbConfig['port']};dbname={$this->dbConfig['dbname']}; charset={$this->dbConfig['charset']}"; //Create PDO object new PDO($dsn,$this->dbConfig['user'],$this->dbConfig['pass']); //Set the client's default character set $this->conn->query("SET NAMES {$this->dbConfig['charset']}"); //Here is line 70 }catch (PDOException $e){ die('Database connection failed'.$e->getMessage()); } }
    好想睡懒觉、 author 2018-02-27 09:23:35
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template