卜算子翻译:PHP 的问题着急啊

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 05:01:40
Fatal error: Call to undefined function mysql_connect() in C:\AppServ\www\52house\system\classes\Connection.inc on line 17
出这个错误
这个文件
<?
include_once "Object.inc";

// 数据库连接
class Connection extends Object
{
var $conn;

//初始化连接
function Connection() {
$this->Created();
}

//连接MYSQL数据库
//返回连接
function Connect ($host,$username,$password,$database) {
$this->conn=mysql_connect($host,$username,$password);
mysql_select_db($database,$this->conn);
return $this->conn;
}

//返回当前连接的资源
function getConnect() {
return $this->conn;
}

//执行查询
function execute($sql) {
return mysql_query($sql,$this->conn);
}

//断开连接
function Disponse() {
mysql_close($this->conn);
}
}
?>