PHP trying to use autoload function to find PDO class
This has been bugging me for some time now and I can't seem to make sense of it. My phpinfo reports that PDO is installed and I can connect to my database on my index.php file. But when I try to open a PDO connection on a namespaced class, php is trying to use my autoload function to find PDO.php which won't work. My class is as follows: abstract class { protected $DB; public function __construct() { try { $this->DB = new PDO("mysql:host=$host;port=$port;dbname=$dbname", $user, $pass); } catch(PDOException $e) { echo $e->getMessage(); } } } And the error is Warning: require_once((...)/Model