I've read tutorial on tutorial and I try to work with Object Oriented PHP but the thing is that I find it rather complex. When I create a class I must include it in the current working document. It doesn't work as in Java when the compiler finds the script in the same folder anyway. And when I always must include that class in different directories it gets really inefficient. Is there a way to achieve what I'm looking for? Or have I completely misunderstood the concept in PHP?
Today I have a script which automatically fixes the correct directory relative from the current working directory and return to me an array with paths so that I can write...
$paths['db_class']
To get the path to the db_class. How should I proceed to achieve effective programming? And how exactly do I use :: ?