mirror of
https://github.com/Floriansylvain/projet_programmation_web.git
synced 2026-10-19 04:53:51 +02:00
🎨 Adding conf.php class to create PDO exclusively from this.
This commit is contained in:
1 parent
b0547ee0ee
commit
f2f0ee96f0
4 files changed
+20
-6
No files matched your search
@@ -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