开发者

mysql_connect() does connect to MySQL

I am in a terrible situation. My PHP works with MySQL database when I use MySQLi connection code, but when I try to connect the database using

<?php
    mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
    echo "Connected to MySQL<br />";
?>

I don't get any error message. Rather the browser just goes offline or error message. I have been trying to figure this out for two weeks.

In my PHP both MySQL and m开发者_Python百科ysqli lines are uncommented. I am using Windows 7 64 bit.


Try using 127.0.0.1 instead of localhost.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜