I am having a problem calling a class from inside an included file. For some reason I can call it from outside the file but when calling it from within the file, I get the following error.
Fatal error: Cannot instantiate non-existent class
Now from what I understand, this means that the class doesnt exist or I spelled something wrong but this isn't the case as I copy the class call directy from the pages where it works. Below is the code.
$DB = new sql_driver;
$DB->connect();
$DB->query("select M.fname, M.lname, L.rank, etc
And this calls the class sql_driver. I haven't had any problem with it except when I call it from an includes. Does anyone have any clue as to why this doesn't work?