In PHP 5 you can also define __autoload:
http://www.php.net/manual/en/language.oop5.autoload.php
So, if you name all your class definition files /lib/someclass.obj.php,
you would define __autoload as such:
function __autoload($class_name) {
require_once "/lib/" . $class_name . ".obj.php";
}
Put that function in an include (autoloader.php or something) and then
require_once autoloader.php at the top of your pages. If you try to
instantiate a class and PHP doesn't know about it, it executes the
autoloader and you class definition file will be included
automatically. This is especially useful if you have a lot of classes
(each in their own file) and you don't want a whole bunch of includes
at the top of your pages.