<?phpclass mSQLi {protected $MySQLiHost = "localhost";protected $MySQLiPort = "3306";protected $MySQLiUser = "root";protected $MySQLiPasswd = "";protected $MySQLiName = "php";protected $MySQLiBaglanti;public function __construct(){return $this->MySQLiBaglanti();}public function MySQLiBaglanti(){$this->MySQLiBaglanti = mysqli_connect($this->MySQLiHost.":".$this->MySQLiPort, $this->MySQLiUser, $this->MySQLiPasswd,$this->MySQLiName) or die("Veritabanı Bağlantı Hatası: ".mysqli_errno($this->MySQLiBaglanti)." : ".mysqli_error($this->MySQLiBaglanti));return true;}public function MySQLiSonlandir(){mysqli_close($this->MySQLiBaglanti);return true;}}$db = new mSQLi;$db->MySQLiBaglanti();$db->MySQLiSonlandir();?>