Skip to content

Commit

Permalink
Feat: add .env and connexion files exemples
Browse files Browse the repository at this point in the history
  • Loading branch information
eliooooooo committed Oct 16, 2024
1 parent c90962d commit b82cddf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chart-my-time/.env.exemple
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=dev
DISPLAY_ERRORS=1
14 changes: 14 additions & 0 deletions chart-my-time/utils/connexion.exemple.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

function connexion()
{
$pdo = new PDO('mysql:host=database;dbname=elioooftime;charset=utf8', 'lamp', 'root');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);

if ($pdo) {
return $pdo;
} else {
echo '<p>Erreur de connexion</p>';
exit;
}
}

0 comments on commit b82cddf

Please sign in to comment.