I have created several objects that I need available in most of my php code.
I am using the require statement to identify them in my code. Like:
Require("classes/databaseManager.php");
I am starting to have problems because I have code that includes other code, both of which containing the same require statements.
This obviously results in an error at run-time because the object is already defined. However, there are times when I need to execute the code seperate from each other which is why they both contain the require statement to begin with.
I know I am going about this the wrong way. Does anyone have some words of wisdom to guide me in the right direction?
I thought that maybe there was a way to create "global" objects without using "require" throughout my code?
Mike