【www.bbyears.com--php函数】
mysql_connect介绍
php mysql_connect用于连接mysql服务器,该函数有多个参数,但我们一般只需要了解以下三个参数即可:
mysql_connect(server,user,pwd)参数介绍:
server -- mysql服务器地址 user -- 服务器用户名 pwd -- 服务器登录密码如果连接成功,则返回一个 MySQL 连接标识,如果连接失败则返回 FALSE。
mysql_connect实例
word"; $connection= mysql_connect ($host,$uname,$pass); if(!$connection) { die("mysql服务器连接失败"); }else{ echo"恭喜你!mysql服务器连接成功"; } ?>