A-A+
连接到MySQL数据库
<?
$con=mysql_connect("localhost","root","");
if($con)
{
echo "成功连接到服务器<p>";
}
else
{
echo "连接服务器时出现错误!";
}
?>
<?
$con=mysql_connect("localhost","root","");
if($con)
{
echo "成功连接到服务器<p>";
}
else
{
echo "连接服务器时出现错误!";
}
?>