View sourcecode

The following files exists in this folder. Click to view.

pdo.php

1 lines ASCII Unix (LF)
1
<?php

include "config.php";

echo "PDO loaded drivers are: <pre>" . print_r(PDO::getAvailableDrivers(), 1) . "<pre>";
echo "Trying to connect through PDO...<br>";

$db = new PDO("mysql:host=blu-ray.student.bth.se;dbname=mos;", "mos", DB_PASSWORD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"));

var_dump($db);