VOIR userController pour ce qu'il faut demander au prof

ServeurDeTest
nathan boileau 2 years ago
parent a4e349ccc9
commit dcd777fa64

@ -14,7 +14,7 @@ $rep = __DIR__ . '/../';
// $password = 'p';
// SQULITE3
$dsn = './Model/scripted.db';
$dsn = './../Model/scripted.db';
//Sel de hashage
$sel = "JeSuisUnSeldeHashageEtJeSuisUniqueEtTresSecuriseEtJeSuisTresLong";

@ -1,5 +1,7 @@
<?php
// Mettre le xdebug dans php.ini
class UserController
{
private Connection $con;
@ -44,9 +46,9 @@ class UserController
{
$error = $e->getMessage();
require ($rep.$vues['erreur']);
}catch (Exception $e)
}catch (Exception $e2)
{
$error = $e->getMessage();
$error = $e2->getMessage();
require ($rep.$vues['erreur']);
}
}

@ -12,13 +12,22 @@ Autoload::charger();
// $stm->execute();
// $res = $db->query('SELECT * FROM Utilisateur');
// // Select all the users in the database
// Select all the users in the database
// while ($row = $res->fetchArray()) {
// echo $row['email'] . " " . $row['password'] . " " . $row['pseudo'] . " " . $row['admin'] . " ";
// }
echo "test";
try{
echo $test;
var_dump($dsn);
$db = new Connection($dsn);
var_dump($db);
}
catch (Exception $e){ echo $e->getMessage();}
catch (Error $e2){ echo $e2->getMessage();}
echo "test2";
$control = new FrontController();

Loading…
Cancel
Save