Update index.php

This commit is contained in:
Namhyeon Go 2017-12-25 19:20:28 +09:00 committed by GitHub
parent 69a887767a
commit ac4c123fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,14 +44,14 @@ function renderView($name, $data=array()) {
$viewfile = './view/' . $name . '.php';
if(file_exists($viewfile)) {
include('./view/' . $name . '.php');
include($viewfile);
}
}
// including route file
$route_file_name = './route/' . $route . '.php';
if(file_exists($route_file_name)) {
include('./route/' . $route . '.php');
include($route_file_name);
} else {
echo "404 Not Found";
}