• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'Class X not found' error

#1
Sad 
Code:
<?php namespace App\Libraries;

class BNCdb
{
    private $db = NULL;

    public function __construct()
    {
        try {
            $db = new PDO('informix:host=dev-bnc3-db; database=development; server=devbnc, bncdev, bncdev!');
         $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     } catch (PDOException $e) {
            log_message('error', $e->getMessage());
        }
    }
}

When I instantiate this class I get a 'Class App\Libraries\PDO not found' error. Why?

PDO is enabled. I'm using PHP 7. Why is it looking in App\Libraries?
Simpler is always better
Reply


Messages In This Thread
'Class X not found' error - by donpwinston - 04-22-2017, 09:26 PM
RE: 'Class X not found' error - by skunkbad - 04-22-2017, 09:32 PM
RE: 'Class X not found' error - by donpwinston - 04-22-2017, 09:52 PM
RE: 'Class X not found' error - by sv3tli0 - 04-24-2017, 03:56 AM
RE: 'Class X not found' error - by kilishan - 04-23-2017, 07:03 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.