Parent class in another directory and __autoload() function

Confused about classes in php. There are for example two classes

abstract class Module {
   public final function buildPage($action) {
    do{
        //  ,   
        //(    )
        if (substr($action, 0, 1) == '_' or empty($action)) 
            break;
        //      ,    
        if (method_exists(__CLASS__, $action))
            break;
        if (!method_exists($this, $action))
            break;
        $method = new ReflectionMethod($this, $action);
        //   
        if (!$method->isPublic())
            break;
        return $this->$action();
    }while(false);  
    return $this->error404();
   }
   public function error404(){
        echo '    ';
   }
}

and

class ExampleModule extends Module{
    function hello(){
        echo 'hello World!';
    }
    function test(){
        echo '!!!';
    }
    protected function inner(){
        echo '     !';
    }
}

first class is in /classes/dir1/ and second class is in /classes/dir2/

How to include them with the __autoload function?

function __autoload($class_name){
    if(file_exists('classes/dir2/'.$class_name.'.class.php'))
        require_once 'classes/dir2/'.$class_name.'.class.php';
}
$module=new ExampleModule();
$module->buildPage(isset($_GET['action'])?$_GET['action']:'');

Answer 1, authority 100%

   if(file_exists('classes/dir2/'.$class_name.'.class.php'))
    require_once 'classes/dir2/'.$class_name.'.class.php';

A similar code will need to be written for dir1. Although I don’t know what these directories are for, why not store everything in /classes?

And of course, autoload must be attached to the running script. Well, i.e. if we have index.php, then autoload must be defined either in it or in some file connected to index.php.