load(); // 테스트 URL : "http://test.com/Control/Method/arg1/arg2"; // 요청된 URL 경로 가져오기 $url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : false; $url = !$url && isset($argv[1]) ? $argv[1] : false; $app = new App(trim($url, '/')); $controller = $app->getController(); $method = $app->getMethod(); return $controller->$method(); } catch (\Exception $e) { echo $e->getMessage(); }