On Mon, Sep 22, 2008 at 2:54 AM, Shelley <myphplist@xxxxxxxxx> wrote: > Hi all, > > Is there any way to auto load a class without using __autoload() function? > > As I want to load some classes under different paths, and that caused > redeclare of __autoload function. a lot of people / frameworks, etc. define their own class loading mechanism in userspace. heres a simple example, function _autoload($class) { include(STD_CLASS_PATH . "/$class.php"); if(!class_exists($class)) { trigger_error("unable to load class $class.", E_USER_NOTICE); return false; } else return true; } -nathan