📅  最后修改于: 2022-03-11 14:54:38.856000             🧑  作者: Mango
try
{
$bdd = new PDO('mysql:host=localhost;dbname=forum;charset=utf8', 'root', 'root', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
}
catch (Exception $e)
{
die('Erreur : ' . $e->getMessage());
}
return $bdd;