This commit is contained in:
2018-12-10 09:22:31 +01:00
parent 5f85de2197
commit f538f99fb6
2 changed files with 68 additions and 5 deletions

16
project/assets/php/handler.php Normal file → Executable file
View File

@ -1,10 +1,10 @@
<?php
/* Fichier qui va gerer la creation de la page et la redirection au cas ou */
ini_set('display_errors', 'On');
// var_dump($_SERVER);
//renvoie vers le fichier css si il est demandé
if(endsWith($_GET["page"], ".css")) {
echo file_get_contents("../css/style.css");
die;
@ -17,6 +17,11 @@ if(endsWith($_GET["page"], ".js")) {
die;
}
//va cherche l'image uploader
if(false) {
}
//rajout d'un / a la fin (parceque c'est jolie)
if($_GET["page"] != "" && !endsWith($_GET["page"], "/")) {
header("Location: /".$_GET["page"]."/");
@ -29,12 +34,13 @@ if($_GET['page'] == '') {
$_GET['page'] = 'index';
}
// é
// var_dump($_POST);
// var_dump($_GET);
// die;
if($_GET["page"] == "test") {
include_once "test.php";
die;
}
include_once "tagHandler.php";
$pokemon = loadTags("../html/".$_GET["page"].".html", false);
// var_dump(mb_detect_encoding($pokemon));