CodeDecode
CodeDecode

Reputation: 401

Class 'DatabaseRoot' not found in

DBHandler.php

class DatabseRoot {
    public $conn;

    public function __construct() {
        require_once dirname(__FILE__) . '/DbConnect.php';
        // opening db connection
        $db = new DbConnect();
        $this->conn = $db->connect();
    }
}


class UserHandler extends DatabaseRoot{

}

But the above extension says DatabaseRoot not found, Both these classes are inside the same DBHandler.php. If anybody can point out what I am doing wrong that would be great.

Upvotes: 0

Views: 36

Answers (1)

Vasil Rashkov
Vasil Rashkov

Reputation: 1834

Change DatabseRoot to DatabaseRoot

Upvotes: 4

Related Questions