Salute the people, krch I do not want to connect ...
mysql.php
<? class Mysql { private $db; private $config; public function __construct(){ $this->config = include __DIR__ .'/config.php'; $this->db = new PDO("mysql:dbname={$this->config['dbname']};host={$this->config['dbhost']}, {$this->config['dbuser']}, {$this->config['dbpassword']}"); } function query($sql, $params=[]) { $sth - $this->db->prepare($sql); $sth = $sth->execute($params); return $sth->fetchAll(); } } This is the error I get when I create a class:
Warning: PDO :: __ construct (): php_network_getaddresses: getaddrinfo failed: . in E: \ OpenServer \ OpenServer \ domains \ blackmarket \ core \ mysql.php on line 9
Fatal error: in E: \ OpenServer \ OpenServer \ domains \ blackmarket \ core \ mysql.php on line 9