注意:未定义的变量:第14行/opt/lampp/htdocs/hanleecome/index.php中的com
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /opt/lampp/htdocs/hanleecome/admin/lib/class.database.php on line 100
我的class.database.php文件
function query($sql=""){
if($sql)
$this->sql = str_replace('#_', $this->refix, $sql);
$this->result = mysqli_query($this->db,$this->sql);
if(!$this->result){
#die(mysql_errno($this->db) . ": " . mysql_error($this->db));
die("syntax error: ".$this->sql);
}
return $this->result;
}