/*数据库连接*/ public function connect() { $this->conn = mysql_connect($this->db_host, $this->db_user, $this->db_pwd) or die($this->error("数据库服务器连接出错!")); mysql_select_db($this->db_database, $this->conn) or die($this->error("数据库连接出错!")); mysql_query("set names '$this->coding'"); } 麻烦你看下这个语句有错误吗?怎么提示:call too undefined function mysql_connect(),就是加亮那行
你还是用Navicat for MySQL这个软件吧,安装完成后直接连接mysql数据库,新建表然后倒入sql语句就可以了,至于你上面说的数据库连接出错那肯定是没有找到mysql数据库的dll文件,你把所有的配置的dll文件路径改成你安装PHP的路径,不要system32下面的dll文件。
http://hbcqxb.blog.163.com/blog/static/355929142010917112450867/
public function connect() {
$this->conn = mysql_connect($this->db_host, $this->db_user, $this->db_pwd) or die($this->error("数据库服务器连接出错!"));
mysql_select_db($this->db_database, $this->conn) or die($this->error("数据库连接出错!"));
mysql_query("set names '$this->coding'");
}
麻烦你看下这个语句有错误吗?怎么提示:call too undefined function mysql_connect(),就是加亮那行