Quote:
quote:Originally posted by Moharo
make sure you include the path to the file which contains your parent class from which the other one is inheriting using function include_once(). maybe you should try placing both of these classes in one file...
|
You shouldn't put all your eggs in one basket, nor should you necessarily put all your base and derived classes in the same file. A base class might be used by several sub-classes, neither of which need to know about the other. The best approach is to define each class in it's own file, and use require_once() in each file where a subclass of that base class is defined. There are times when you want to define your derived classes in the same file as your base class, but those cases are generally rare.
Take care,
Nik
http://www.bigaction.org/