关于在php中连接数据库的错误
问题描述:
我正在这样编写我的代码
i am doing my code like this
$con=mysqli_connect("localhost","root","root","floralsupply");
并且在此行浏览器上,正在给予这个错误 * 警告: *
and on this line browser is giving me this error *Warning:*
mysqli_connect():php_network_getaddresses:getaddrinfo失败: 请求的名称有效,但未找到请求类型的数据
mysqli_connect(): php_network_getaddresses: getaddrinfo failed: The requested name is valid, but no data of the requested type was found
答
$con=mysqli_connect("127.0.0.1","root","root","floralsupply");