SHARE
TWEET

Untitled

a guest Aug 12th, 2016 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Připojovací údaje
  2. define('SQL_HOST', 'wm40.wedos.net');
  3. define('SQL_DBNAME', 'd48824_tsaktiv');
  4. define('SQL_USERNAME', 'a48824_tsaktiv');
  5. define('SQL_PASSWORD', 'CQ3G4N3J');
  6.  
  7. $dsn = 'mysql:dbname=' . SQL_DBNAME . ';host=' . SQL_HOST . '';
  8. $user = SQL_USERNAME;
  9. $password = SQL_PASSWORD;
  10.  
  11.     $dbh = new PDO($dsn,  $user, $password);
  12.     $dbh->exec("set names utf8");
  13.  
  14.  
  15. try {
  16.     $pdo = new PDO($dsn, $user, $password);
  17.     $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  18.  
  19. } catch (PDOException $e) {
  20.     die('Connection failed: ' . $e->getMessage());
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top