<?php $db_host = "localhost"; $db_user = "root"; $db_pass = ""; $link = mysql_connect($db_host,$db_user,$db_pass)or die("不能连接到服务器".mysql_error()); echo "连接成功!"; ?>