$this->conn = mysql_connect($this->db_host, $this->db_user, $this->db_pwd) ;
if ( !($this->conn) )
{
die('Could not connect:'.mydsql_error('连接出错')) ;
}
拼写错误

解决方案 »

  1.   

    观察到
    'noco '@'14.210.115.31'

    'noco'@'14.210.115.31'
    的区别
    显然是多了空格、回车、换行之类的字符你是怎么读取 ini 文件的?
      

  2.   

    读取文件方式:
    $this->db_host = fgets($openfile) ;
    $this->db_user = fgets($openfile) ;
    $this->db_pwd = fgets($openfile) ;
      

  3.   

    那是要去掉尾部的空白字符的(空格、回车、换行)$this->db_host = trim(fgets($openfile)) ;
    $this->db_user = trim(fgets($openfile)) ;
    $this->db_pwd = trim(fgets($openfile)) ;
      

  4.   

    显然 'noco '@'14.210.115.31'  用户名后面多了个空格。