1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
PHP_TP3/lib/getPDD.php

12 lines
296 B
PHP
Raw Permalink Normal View History

2020-10-16 09:28:41 +02:00
<?php
function getPDO() {
try {
$bdd = new PDO("mysql:host=" . BD_HOST . ";dbname=" . BD_DBNAME . ";charset = utf8", BD_USER, BD_PWD);
$bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
return $bdd;
} catch (Exception $e) {
return $e;
}
}