Restructuration du index.php pour charger Twig et lancer le front controller

correction_routeur
Alix JEUDI--LEMOINE 2 years ago
parent 2384ee9980
commit 3a0757032e

@ -1,11 +1,20 @@
<html> <?php
require_once(__DIR__.'/vendor/autoload.php');
require_once(__DIR__.'/config/config.php');
<body>
test
<?php use controller\FrontController;
require_once(__DIR__.'/vendor/autoload.php');
require_once(__DIR__.'/config/config.php'); //twig
$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader, [
'cache' => false,
]);
$cont = new FrontController();
/*
try{ try{
$con=new model\Connection($dsn,$login,$mdp); $con=new model\Connection($dsn,$login,$mdp);
@ -23,7 +32,4 @@ try{
catch( PDOException $Exception ) { catch( PDOException $Exception ) {
echo 'erreur'; echo 'erreur';
echo $Exception->getMessage();} echo $Exception->getMessage();}
?> */
</body>
</html>
Loading…
Cancel
Save