阅读603 返回首页    go 中电云集


测试使用PHP连接数据库的方法。

直接使用以下代码:
#Mysql 帐号用户名,请将xxxx改为您相应的用户名
$mysql_user = “xxxx”;
#Mysql 帐号密码,请将xxxx改为您相应的密码
$mysql_password = “xxxxxx”;
$link = mysql_connect(”localhost”,$mysql_user,$mysql_password) or die(”Could not connect”);
print (”Connected successfully”);
mysql_close($link);
?>
如果您可以在网页上看到“Connected successfully”的字样,就证明数据库可正常使用了。

最后更新:2017-01-04 22:34:51

  上一篇:go 通过iisapp命令查找pid解决IIS的CUP占用率过高问题
  下一篇:go 用putty密钥登陆出现server refused our key解决方法