VaginaMuncher
Chilling with me bitch Fiona
- Mar 17, 2013
- 447
- 58
Basically I'm just testing database connections
"echo 'Connected';" yet nothing comes out..
I'm new to this PHP/PDO coding etc. Don't see what's wrong S:
"echo 'Connected';" yet nothing comes out..
I'm new to this PHP/PDO coding etc. Don't see what's wrong S:
Code:
<?php
class DB{
private static $_instance = null;
private $_pdo,
$_query,
$_error = false,
$_results,
$_count = 0;
private function __construct() {
try {
$this->_pdo = new PDO('mysql:host=' . Config::get('mysql/host') . ';dbname=' . Config::get('mysql/db'), Config::get('mysql/username'), Config::get('mysql/password'));
echo 'Connected';
} catch(PDOException $e)
die($e->getMessage());
}
}
public static function getInstance();{
if(!isset(self::$_instance)) {
self::$_instance = new DB();
}
return self::$_instance;
}
}
?>