• zgrlk iin Pardus...

PHP ve Oracle Bağlantı Classı

Php ile Oracle veritabanı yönetim sistemine bağlantı için aşağıdaki class çok işinize yarayacak…
class oracle_object {
protected $theDB;
protected $user;
protected $pass;
protected $db;

function __construct($u, $p, $d) {
$this->user = $u;
$this->pass = $p;
$this->db = $d;
}

function db_open () {
$theDB = @OCILogon($this->user, $this->pass, $this->db);
db_check_errors($php_errormsg);
}

function db_close() {
@OCILogoff($theDB);
db_check_errors($php_errormsg);
}

function __destruct () {
print (”so long…”);
}

}
Kullanımı ise;
<?php
$db=new oracle_object(”username”,”password”,”databasename”);
$db->db_open();
?>
Kolay gelsin…

  • #1
    Posted by bülent on July 25th, 2008 at 9:08 am

    teşekkürler…

Share your opinion! Post your thoughts.