note 125621 added to class.pdo

From: Date: Sun, 20 Dec 2020 15:06:48 +0000
Subject: note 125621 added to class.pdo
Groups: php.notes 
Request: Send a blank email to php-notes+get-216012@lists.php.net to get a copy of this message
class Database { private $conn; public function __construct($configFile = "config.ini") { if ($config = parse_ini_file($configFile)) { $host = $config["host"]; $database = $config["database"]; $user = $config["user"]; $password = $config["password"]; $this->conn = new PDO("mysql:host=$host;dbname=$database", $user, $password); $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } } } ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.165 (proxied: 95.85.139.254) ---- Manual Page -- http://php.net/manual/en/class.pdo.php Edit -- https://master.php.net/note/edit/125621 Del: integrated -- https://master.php.net/note/delete/125621/integrated Del: useless -- https://master.php.net/note/delete/125621/useless Del: bad code -- https://master.php.net/note/delete/125621/bad+code Del: spam -- https://master.php.net/note/delete/125621/spam Del: non-english -- https://master.php.net/note/delete/125621/non-english Del: in docs -- https://master.php.net/note/delete/125621/in+docs Del: other reasons-- https://master.php.net/note/delete/125621 Reject -- https://master.php.net/note/reject/125621 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#216012) next »