$path = "index.index"; } else if (!strstr($path, ".")) { $path .= ".index"; } if (!preg_match("/(^.*(?:^|\\.))([\\w]+)\\.(\\w+)$/", $path, $match)) { throw new \Exception("You are calling an invalid action '{$path}'."); } $name = $match[1] . $match[2]; $mainRoot = PP_WEB . "/mvc/controllers"; if ($module != null) { define("PP_MODULE", $module); $mainRoot = PP_WEB . "/{$module}.mvc/controllers"; }