當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBAccess::getPassword方法代碼示例

本文整理匯總了PHP中DBAccess::getPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBAccess::getPassword方法的具體用法?PHP DBAccess::getPassword怎麽用?PHP DBAccess::getPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DBAccess的用法示例。


在下文中一共展示了DBAccess::getPassword方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: connect

 function connect()
 {
     if (strtoupper($this->dbType) != "MYSQL") {
         return false;
     }
     if ($this->isConnect) {
         return true;
     }
     $hostStr = "";
     if (parent::getHost() != "") {
         $hostStr .= parent::getHost();
     } else {
         return false;
     }
     if (parent::getPort() != 0) {
         $hostStr .= ":" . parent::getPort();
     }
     $this->connection = mysql_connect($hostStr, parent::getUser(), parent::getPassword(), true);
     if (!$this->connection) {
         $this->isConnect = false;
     } else {
         $db_selected = mysql_select_db($this->_dbName, $this->connection);
         if (!$db_selected) {
             $this->isConnect = false;
             $this->disconnect();
         } else {
             $this->isConnect = true;
         }
     }
     return $this->isConnect;
 }
開發者ID:bryanbacus,項目名稱:skripsi-martin,代碼行數:31,代碼來源:MySQLAccess.php

示例2: connect

 function connect()
 {
     if (strtoupper($this->dbType) != "ORACLE") {
         return false;
     }
     if ($this->isConnect) {
         return true;
     }
     //echo "connect string = ".parent::getUser()."/".parent::getPassword()."@".$this->_sid."<br>";
     $this->connection = ora_logon(parent::getUser() . "@" . $this->_sid, parent::getPassword());
     if (!$this->connection) {
         $this->isConnect = false;
     } else {
         $this->isConnect = true;
     }
     return $this->isConnect;
 }
開發者ID:bryanbacus,項目名稱:skripsi-martin,代碼行數:17,代碼來源:ORAAccess.php

示例3: connect

 function connect()
 {
     if (strtoupper($this->dbType) != "OCI8") {
         return false;
     }
     if ($this->isConnect) {
         return true;
     }
     if ($this->_sid == "") {
         $this->connection = ocilogon(parent::getUser(), parent::getPassword());
     } else {
         $this->connection = ocilogon(parent::getUser(), parent::getPassword(), $this->getSID());
     }
     if (!$this->connection) {
         $this->isConnect = false;
     } else {
         $this->isConnect = true;
     }
     return $this->isConnect;
 }
開發者ID:bryanbacus,項目名稱:skripsi-martin,代碼行數:20,代碼來源:ORA8Access.php

示例4: connect

 function connect()
 {
     if (strtoupper($this->dbType) != "POSTGRES") {
         return false;
     }
     if ($this->isConnect) {
         return true;
     }
     $connectStr = "";
     if (parent::getHost() != "") {
         $connectStr .= "host=" . parent::getHost() . " ";
     } else {
         return false;
     }
     if (parent::getPort() != 0) {
         $connectStr .= "port=" . parent::getPort() . " ";
     }
     if ($this->_dbName != "") {
         $connectStr .= "dbname=" . $this->_dbName . " ";
     } else {
         return false;
     }
     if (parent::getUser() != "") {
         $connectStr .= "user=" . parent::getUser() . " ";
     } else {
         return false;
     }
     if (parent::getPassword() != "") {
         $connectStr .= "password=" . parent::getPassword() . " ";
     }
     $this->connection = pg_connect($connectStr);
     if (!$this->connection) {
         $this->isConnect = false;
     } else {
         $this->isConnect = true;
     }
     return $this->isConnect;
 }
開發者ID:bryanbacus,項目名稱:skripsi-martin,代碼行數:38,代碼來源:PGAccess.php


注:本文中的DBAccess::getPassword方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。