On Wed, 17 Nov 2004 19:17:13 -0200, Bruno B B Magalhães
<[EMAIL PROTECTED]> wrote:

> Continuing the classes questions...
> 
> I have a class loader called 'load_core_class($class=''), but if $class
> equals to all I would like to load all classes in the core directory,
> include then AND start then this way:
> 

If you're on PHP-5 you could use the __autoload function, so when a
class is used will be automatically locaded. You should declare this
function before using any class:

function __autoload($classname)
{
    require_once('/path/to/classes/dir/' . $classname . '.inc');
}

Regards,
Jordi.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to