File manager - Edit - /home/cuautla1/httpsdocs/subirpdf/includes/db.php
Back
<?php class DB{ private $host; private $db; private $user; private $password; private $charset; public function __construct(){ $this->host = 'localhost'; $this->db = 'usuarios'; $this->user = 'users'; $this->password = 'Ht24gm@6'; $this->charset = 'utf8mb4'; } function connect(){ try{ $connection = "mysql:host=" . $this->host . ";dbname=" . $this->db . ";charset=" . $this->charset; $options = [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_EMULATE_PREPARES => false, ]; $pdo = new PDO($connection, $this->user, $this->password, $options); return $pdo; }catch(PDOException $e){ print_r('Error connection: ' . $e->getMessage()); } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0 |
proxy
|
phpinfo
|
Settings