mysql_connect()连接不上是什么原因(晕死!!!!)
MN归来 2005-08-09 09:28:34 我的组合是LAMP,mysql在终端可以连接的上,
但是在php页面为什么就不行了呢,这是我的php代码:
<html>
<title>My First php</title>
<body>
hello,world.
<?php
$host="localhost:80";
$user="root";
$password="wwwx1000";
//连接MySQL数据库
mysql_connect("$host","$user","$password") or die("无法连接MySQL数据库服务器!");
?>
</body>
</html>
运行结果是:无法连接数据库