mirror of
https://github.com/Floriansylvain/projet_programmation_web.git
synced 2026-08-19 11:43:16 +02:00
🎨 Adding conf.php class to create PDO exclusively from this.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user