mysqli数据库链接的单例对象

class Db {
private static $instance;
public KaTeX parse error: Expected group after '_' at position 28: …ivate function _̲_construct(host, u s e r n a m e , username, username,password,$dbname) {
$this->handle=NULL;
t h i s − > g e t c o n ( this->getcon( this>getcon(host, u s e r n a m e , username, username,password,KaTeX parse error: Expected 'EOF', got '}' at position 12: dbname); }̲ public stati…instance=new Db();
return self::KaTeX parse error: Expected 'EOF', got '}' at position 13: instance; }̲ private func…host, u s e r n a m e , username, username,password,KaTeX parse error: Expected '}', got 'EOF' at end of input: …bname) { if(this->handle!=NULL){
return true;
}
t h i s − > h a n d l e = m y s q l i c o n n e c t ( this->handle=mysqli_connect( this>handle=mysqliconnect(host, u s e r n a m e , username, username,password,$dbname);
}
}

猜你喜欢

转载自blog.csdn.net/hanxiaoyang6/article/details/114029500