Created
April 3, 2013 17:23
-
-
Save yooslim/5303274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; | |
$pdo_options[PDO::MYSQL_ATTR_INIT_COMMAND] = "SET NAMES utf8"; | |
$bdd = new PDO('mysql:host=localhost;dbname=databaseName', 'root', '', $pdo_options); | |
} | |
catch (Exception $e) { | |
die('Erreur : ' . $e->getMessage()); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment