This comes in the form of the __autoload function which automatically gets called if a class is called that does not exist. Here's what it looks like:
Code: Select all
function __autoload($class) {
require_once(strtolower($class) . '.class.php');
}
Place each PHP class in individual files named after the class followed by .class.php (Example: class MyClass goes in a file named myclass.class.php).
Include the code snipped above into any file that might use one of your classes.
For more details, check out the PHP manual: http://www.php.net/manual/language.oop5.autoload.php