1 php
2 // PHP5 Used __autoload function
3 $obj_A = new clsA(); // in "cls" directory!
4 $obj_B = new clsB(); // in "cls/cls" directory!
5 function __autoload($className){
6 if(strtolowwer($className) == "clsb"){
7 require_once "cls/cls/$className.php";
8 }else{
9 include_once "cls/$className.php";
10 }
11 }
12 ?>