php_network_getaddresses: getaddrinfo falló: no se conoce tal host, ¿por qué se muestra esto [cerrado]

-2
$con = mysqli_connect("localhost ","root "," ","project");//connectivity

Este es el código, recibo el error:

php_network_getaddresses: getaddrinfo failed: No such host is known

1
  • No such hostlos medios localhost no se resolvieron. 14 de oct a las 2:58
1

Si este es tu codigo

$con = mysqli_connect("localhost ","root "," ","project");//connectivity

cámbialo a esto

$con = mysqli_connect("localhost","root","","project");//connectivity

No use espacios.