Part on Forms finished
This commit is contained in:
parent
672ef6a949
commit
c0aeac2632
6 changed files with 54 additions and 12 deletions
12
router.php
12
router.php
|
|
@ -1,16 +1,6 @@
|
|||
<?php
|
||||
$uri = parse_url($_SERVER['REQUEST_URI'])['path'];
|
||||
|
||||
$routes = [
|
||||
'/' => 'controllers/index.php',
|
||||
'/about' => 'controllers/about.php',
|
||||
'/contact' => 'controllers/contact.php',
|
||||
'/learn' => 'controllers/learn.php',
|
||||
'/mathe' => 'controllers/mathe.php',
|
||||
'/note' => 'controllers/note.php',
|
||||
'/notes' => 'controllers/notes.php',
|
||||
'/addition' => 'controllers/addition.php'
|
||||
];
|
||||
$routes = require ('routes.php');
|
||||
|
||||
function routeToController($uri, $routes) {
|
||||
if (array_key_exists($uri, $routes)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue