Estou com um erro maldito, alguém me ajuda por favor?
db.php (C:\wamp\www\projeto\config)
<?php define("DB_HOST", "localhost"); define("DB_NAME", "projeto"); define("DB_USER", "root"); define("DB_PASS", "");
Newdb.php (C:\wamp\www\projeto\classes)
<?php require_once 'db.php' class DB{ private static $instance; public static function getInstance(){ if(!isset(self::$instance)){ try { self::$instance = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME, DB_USER, DB_PASS); self::$instance->setAtribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); self::$instance->setAtribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); }catch(PDOExcepetion $e){ echo $e->getMessage() } } return self::$instance; } public static function prepare($sql){ return self::getInstance()-prepare($sql); } } DB::prepare($sql); ?>
Está dando este erro, alguém me ajude?
Image may be NSFW.
Clik here to view.