preparing the package
This commit is contained in:
parent
c538909b5a
commit
f45a16d747
|
@ -29,7 +29,7 @@ class Router{
|
||||||
|
|
||||||
if(array_key_exists($this->uri, $routes)){
|
if(array_key_exists($this->uri, $routes)){
|
||||||
list($controller, $method) = explode('@', $routes[$this->uri]);
|
list($controller, $method) = explode('@', $routes[$this->uri]);
|
||||||
$controllerPath = __DIR__ . '/../app/controllers/' . $controller . '.php';
|
$controllerPath = $_SERVER['DOCUMENT_ROOT'] . '/app/controllers/' . $controller . '.php';
|
||||||
|
|
||||||
if(file_exists($controllerPath)){
|
if(file_exists($controllerPath)){
|
||||||
require $controllerPath;
|
require $controllerPath;
|
||||||
|
|
Loading…
Reference in New Issue