/ array_shift($query); switch ($command){ case "help": require_once(__DIR__ . "/help/index.php"); break; case "profile": case "run": case "logbook": case "collection": case "run": case "units": if (file_exists(__DIR__ . "/$command/$method.php")){ require_once(__DIR__ . "/$command/$method.php"); } else{ header("HTTP/1.1 404"); } break; default: header("HTTP/1.1 404"); } } } } ?>