在域中建立连接的连接问题 [英] Connection problem in establish connection in domain
本文介绍了在域中建立连接的连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在wamp服务器上运行php代码它运行正常..
但是当我试图在我的虚拟主机上运行时..
i我在建立连接时出错。
这里是代码
I run the php code on wamp server it runs fine..
but when i tried to run on my webhosting..
i am having an error establishing connecition.
here is the code
$dbhost = "localhost";// here i think is problem
$dbuser = "suntafun_user";
$dbpass = "******";
$dbname = "suntafun_first";
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname) or die ('Unable to select database!');
?>
i认为问题出在db host ..有人请帮助
i think the problem is in db host.. anyone please help
推荐答案
dbhost = localhost; // 这里我认为是问题
dbhost = "localhost";// here i think is problem
dbuser = suntafun_user;
dbuser = "suntafun_user";
dbpass = ******;
dbpass = "******";
这篇关于在域中建立连接的连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文