fixed some bugs
This commit is contained in:
@@ -34,7 +34,12 @@ class Router {
|
||||
private function setRouteFile() {
|
||||
foreach ($this->routes as $key => $value) {
|
||||
if ( $this->path == $key) {
|
||||
$this->controllerPath = BASEPATH . '/App/controllers/' . $value['file'] . '.php';
|
||||
$theFile = BASEPATH . '/App/controllers/' . $value['file'] . '.php';
|
||||
|
||||
//check if the file exists
|
||||
if (file_exists($theFile)) {
|
||||
$this->controllerPath = $theFile;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user