Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SCHULER_VISENTINI_KBIDA_TARDIEU_BDD_Applications_S4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SCHULER Killian
SCHULER_VISENTINI_KBIDA_TARDIEU_BDD_Applications_S4
Commits
2755ab44
Commit
2755ab44
authored
Mar 04, 2020
by
Safyrus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modif index
parent
1b4aa972
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
tp1/src/index.php
tp1/src/index.php
+40
-0
No files found.
tp1/src/index.php
View file @
2755ab44
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment