关于在php中连接数据库的错误 [英] Error about Connecting database in php
本文介绍了关于在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");
这篇关于关于在php中连接数据库的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文