Soeren_K_K

For at starte PDO

Dec 30th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. // Require the configurations
  2. require_once('config.php'); // tilpas til stien til dine DB oplysninger
  3.  
  4. // Require the PDO class
  5. require_once('myPDO.php'); // tilpas til stien til dine DB oplysninger
  6.  
  7. try {
  8.     // Start PDO
  9.     $pdo = new myPDO();
  10. } catch (Exception $e) {
  11.     // Er der noget der går galt findes alle oplysninger i variablen $e
  12.     echo $e->getMessage();
  13. }
Advertisement
Add Comment
Please, Sign In to add comment