function __autoload($class_name)
{
include $class_name.'.php';
}
Note - This is the simplest example. You can go as far as to create classes for autoloading that will differ depending on the needed directory structure.Now when you call classes, if they weren't included, PHP will look for them and call that function to load them.
No comments:
Post a Comment