mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-06-22 22:39:19 +00:00
modifs!!!!
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
<?php
|
||||
include_once "router.php";
|
||||
|
||||
//recupération du router
|
||||
//recup<EFBFBD>ration du router
|
||||
$router = Router::getRouter();
|
||||
|
||||
$postCharacters = "[a-z0-9-]";
|
||||
|
||||
//page d'accueil
|
||||
$home = function () {
|
||||
return file_get_contents("../html/index.html");
|
||||
@ -16,7 +18,7 @@ $post = function () {
|
||||
return file_get_contents("../html/post.html");
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/post\/$/", $post); // route "/post/*"
|
||||
$router->addRoute("/^\/post\/" + $postCharacters + "+\/*$/", $post); // route "/post/*"
|
||||
|
||||
//page de recherche
|
||||
$search = function () {
|
||||
@ -24,3 +26,9 @@ $search = function () {
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/search\/$/", $search); // route "/search/*"
|
||||
|
||||
$post = function() {
|
||||
var_dump("tst");
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/post\/" + $postCharacters + "+\/edit\/*$/", $post);
|
||||
|
Reference in New Issue
Block a user