Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Db;
- // On "importe" PDO
- use PDO;
- use PDOException;
- class Db extends PDO
- {
- // Instance unique de la classe
- private static $instance;
- // Informations de connexion
- private const DBHOST = 'localhost';
- private const DBUSER = 'root';
- private const DBPASS = '';
- private const DBNAME = 'demo_poo';
- private function __construct()
- {
- // DSN de connexion
- $_dsn = 'mysql:dbname='. self::DBNAME . ';host=' . self::DBHOST;
- // On appelle le constructeur de la classe PDO
- try{
- parent::__construct($_dsn, self::DBUSER, self::DBPASS);
- $this->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, 'SET NAMES utf8');
- $this->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
- $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }catch(PDOException $e){
- die($e->getMessage());
- }
- }
- public static function getInstance():self
- {
- if(self::$instance === null){
- self::$instance = new self();
- }
- return self::$instance;
- }
- }
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=sphajosebq
- This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment