本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}