1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
PHP_TP3/index.php

35 lines
782 B
PHP
Raw Normal View History

2020-10-16 08:16:09 +02:00
<?php
/*
* MODULE DE PHP
* Index du site
*
* Copyright 2016, Eric Dufour
* http://techfacile.fr
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
// Initialisation des paramètres du site
require_once('./config/configuration.php');
require_once('./lib/foncBase.php');
require_once(PATH_TEXTES.LANG.'.php');
//vérification de la page demandée
if(isset($_GET['page']))
{
$page = htmlspecialchars($_GET['page']); // http://.../index.php?page=toto
if(!is_file(PATH_CONTROLLERS.$_GET['page'].".php"))
{
$page = "404"; //page demandée inexistante
}
}
else
$page="accueil"; //page d'accueil du site - http://.../index.php
//appel du controller
require_once(PATH_CONTROLLERS.$page.'.php');
?>