🎨 Adding conf.php class to create PDO exclusively from this.

This commit is contained in:
Florian SYLVAIN
2021-09-24 11:51:27 +02:00
parent b0547ee0ee
commit f2f0ee96f0
4 changed files with 20 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
class conf
{
private pdo $pdo;
public function __construct()
{
$this->pdo = new PDO('mysql:host=localhost;dbname=projet_prog_web', 'root', 'root');
}
public function getPDO() : pdo {
return $this->pdo;
}
}