网站调取sql**库的conn.php程序怎么修改。 知道**库名称, 用户名, 密码和主机IP.非常感谢!

时间:2014.11.01 发布人:jxth892108

网站调取sql**库的conn.php程序怎么修改。 知道**库名称, 用户名, 密码和主机IP.非常感谢!

已解决问题

谷歌jxth892108用户在2014.11.01提交了关于“门徒网站调取sql**库的conn.php程序怎么修改。 知道**库名称, 用户名, 密码和主机IP.非常感谢!”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-10-01T10:31:03。<?phpheader("Content-type:text/html;charset=utf-8");classMySQLDB{var$host="localhost";var$port="3306";var$username="root";var$pwd="";var$db="net_e**";var$db_encode="utf8";var$conn=**ll;functiondb_connect(){$this->conn=mysql_connect($this->host.":".$this->port,$this->username,$this->pwd)ordie("**库服务器连接错误".mysql_error());mysql_select_db($this->db,$this->conn)ordie("**库访问错误".mysql_error());mysql_query("setnames".$this->db_encode);}}希望大家能够帮助她。

详细问题描述及疑问:<?phpheader("Content-type:text/html;charset=utf-8");classMySQLDB{var$host="localhost";var$port="3306";var$username="root";var$pwd="";var$db="net_e**";var$db_encode="utf8";var$conn=**ll;functiondb_connect(){$this->conn=mysql_connect($this->host.":".$this->port,$this->username,$this->pwd)ordie("**库服务器连接错误".mysql_error());mysql_select_db($this->db,$this->conn)ordie("**库访问错误".mysql_error());mysql_query("setnames".$this->db_encode);}}期待您的答案,希望你能感受到,我最真诚的谢意 !

希望以下的回答,能够帮助你。

第1个回答

用户名:zhouyan加双讨先区原延福电系注g27  

你把localh着ost改成你所知道的主机I蒸协侵P,如$host="你所知道的IP地址"
$username=“你所知道的**库用户名”,
$pwd=“你所知道**库的密码”,
$db="你所知道的**库名"。