求大神帮助错误码:Fatal error: Call to undefined function mysql_connect() inE:\kechengsheji\AppServ\www\com\db.php on line 16错误代码:<?phpclass DataAccess{ // $conn存储数据库连接字符串 public $link; // 数据查询的结果集 var $res; function getLink() { return $this->link; } function connect() { $this->link = mysql_connect('localhost', 'root', '111');---------------------------------------这里---------------------------- if (!$this->link) { die(' Could not connect: ' . mysql_error()); } mysql_select_db('job', $this->link) or die ('Cannot use job : ' . mysql_error()); //echo 'Connected successfully'; return $this->link; } function close() { // 释放结果集 if(!empty($this->res)) mysql_free_result($this->res); // 关闭连接 if($this->link) mysql_close($this->link); } function getRowNum() { return mysql_num_rows($this->res); } /*数据查询函数*/ function &query($sql) { mysql_query("set names 'gbk'"); $this->res = mysql_query($sql) or die('数据库查询错误: ' . mysql_error()); return $this->res; } //插入删除修改操作 function &perform($sql) { mysql_query("set names 'gbk'"); $this->res = mysql_query($sql) or die('数据库查询错误: ' . mysql_error()); if($this->res) return true; return false; }} ?>
php配置iis7的方式有两种,ispi和cgi,但是php5.3已经不支持ispi了,只支持cgi,而采用php5.2配置iis7的时候会出现找不到mysql数据库不能用,是因为dll文件没有加载,单击php-cgi.exe,把确少的dll复制到system下,把php.ini复制到windows目录下,重启服务器,就好了。