forked from yousfhi/Wikipechoux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (24 loc) · 803 Bytes
/
index.php
File metadata and controls
31 lines (24 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<?php
session_start();
$racine = dirname(__FILE__);
include "$racine/controleur/Routeur.php";
//Récupération de l'action à exécuter dans l'URL en méthode GET
$action = filter_input(INPUT_GET, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if (!isset($action)) {
$action = "defaut";
}
//Appel au routeur pour récupérer le controleur à appeler
$controleur = Routeur::getControleur($action);
//Inclure le bon controleur
include "$racine/controleur/$controleur";
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</body>
</html>