Story 3.2: router php urls

This commit is contained in:
2026-02-04 17:06:28 +01:00
parent d520fe848f
commit 0409bb1327
13 changed files with 253 additions and 34 deletions

View File

@@ -1,4 +1,15 @@
<?php
// index.php - Point d'entrée temporaire
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/router.php';
require_once __DIR__ . '/pages/home.php';
$router = new Router();
$router
->add('/', 'pages/home.php')
->add('/projets', 'pages/projects.php')
->add('/projet/{slug}', 'pages/project-single.php')
->add('/competences', 'pages/skills.php')
->add('/a-propos', 'pages/about.php')
->add('/contact', 'pages/contact.php');
$router->dispatch();