Skip to content

Instantly share code, notes, and snippets.

@wudi
Last active August 29, 2015 14:06
Show Gist options
  • Save wudi/77baa60374028dff6a13 to your computer and use it in GitHub Desktop.
Save wudi/77baa60374028dff6a13 to your computer and use it in GitHub Desktop.
<?php
$dbConnection = new PDO('mysql:dbname=dbtest;host=127.0.0.1;charset=utf8', 'user', 'pass');
$dbConnection->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment