Commit 2755ab44 authored by Safyrus's avatar Safyrus

modif index

parent 1b4aa972
......@@ -13,5 +13,45 @@ $db = new DB();
'collation' => 'utf8_unicode_ci',
'prefix' => ''
] );*/
// ajout des informations pour se connecter à la base de données
$ini_file = parse_ini_file('../conf/conf.ini');
$db->addConnection([
'driver' => $ini_file['driver'],
'host' => $ini_file['host'],
'database' => $ini_file['database'],
'username' => $ini_file['username'],
'password' => $ini_file['password'],
'charset' => $ini_file['charset'],
'collation' => $ini_file['charset'] . '_unicode_ci',
'prefix' => ''
]);
$db->setAsGlobal();
$db->bootEloquent();
// demerage d'un session
session_start();
// intance de slim qui a pour but de créer le rootage des urls
$app = new Slim();
$app->get('/', function () {
$v = new AccueilView();
$v->render();
})->name('accueil');
$app->get('/ex1/requete1', function () {
})->name('ex1 requete 1');
$app->get('/ex1/requete2', function () {
})->name('ex1 requete 2');
$app->get('/ex1/requete3', function () {
})->name('ex1 requete 3');
$app->get('/ex1/requete4', function () {
})->name('ex1 requete 4');
$app->run();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment