= 3) { $controller = $args[1]; $method = $args[2]; $params = array(); for ($i=3; $i < count($args); $i++) { $params[] = $args[$i]; } $controller_file = dirname(__FILE__).'/controller/rssi_'.$controller.'.php'; if (is_file($controller_file)) { require_once $controller_file; $controller_name = 'Controller_'.ucfirst($controller); if (class_exists($controller_name)) { $c = new $controller_name; if (method_exists($c, $method)) { $found = true; call_user_func_array(array($c, $method), $params); } } } } if (!$found) { //echo print_r($db); echo 'not found'; } } ?>