New answers tagged

0 votes

Connection Error:SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for localhost.dbname=myblog failed: No such host is known

$this->conn = new PDO('mysql:host='. $this->host . ';dbname=' . $this->db_name,$this->username,$this->password); It seems like there's a small syntax error in your PDO connection ...
Roozbeh Abdolhoseini's user avatar

Top 50 recent answers are included