现在的位置: 首页 > 综合 > 正文

PHP连接MySQL数据库 ————001

2017年10月13日 ⁄ 综合 ⁄ 共 228字 ⁄ 字号 评论关闭
<?php
	print "Opening the connection to the database server<br />";
	$link = mysql_connect("localhost","root","password");
	print "The connection worked. The link is : $link<br />";
	print "Closing the connection <br />";
	mysql_close($link);
?>

显示:

如果连接失败,则返回FALSE

抱歉!评论已关闭.