当前位置: 首页>>代码示例>>PHP>>正文


PHP ora_logon函数代码示例

本文整理汇总了PHP中ora_logon函数的典型用法代码示例。如果您正苦于以下问题:PHP ora_logon函数的具体用法?PHP ora_logon怎么用?PHP ora_logon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ora_logon函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: db_oracle

 function db_oracle($host, $user, $passwd, $db = null)
 {
     $this->db_name = $db;
     $this->db_user = $user;
     $this->db_passwd = $passwd;
     $this->db_host = $host;
     $this->db_link_ptr = ora_logon("{$user}@{$host}", $passwd) or $this->error("", ora_error(), ora_errcode());
     $this->dbhandler = @ora_select_db($db);
 }
开发者ID:rezarahimi4861,项目名称:icmf,代码行数:9,代码来源:oracle.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($argHostname, $argUsername, $argPassword, $argDatabasename)
 {
     if ($argHostname) {
         putenv("ORACLE_HOME={$argHostname}");
     }
     //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>";
     $this->_connectionID = ora_logon($argUsername, $argPassword);
     if ($this->_connectionID === false) {
         return false;
     }
     if ($this->autoCommit) {
         ora_commiton($this->_connectionID);
     }
     if ($this->_initdate) {
         $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'");
     }
     return true;
 }
开发者ID:qoire,项目名称:portal,代码行数:18,代码来源:adodb-oracle.inc.php

示例4: getconnection

 function getconnection()
 {
     // CONFIG
     $servicio = "prueba";
     $dirora = "c:\\oracle\\ora81";
     $usuario = "orfeo";
     $contrasena = "super";
     $servidor = "orfeo";
     putenv("ORACLE_SID={$servicio}");
     putenv("ORACLE_HOME={$dirora}");
     $handle = ora_logon("{$usuario}@{$servicio}", "{$contrasena}");
     if (!$handle) {
         print "NO HAY CONEXION   ........................";
     }
     // FIN CONFIG
     $q = new DB_Sql();
     $q->Home = "{$dirora}";
     $q->Database = "(DESCRIPTION=\r\n\t\t\t(ADDRESS_LIST=\r\n\t\t\t(ADDRESS=(PROTOCOL=TCP)\r\n\t\t\t(HOST={$servidor})(PORT=1521)\r\n\t\t\t)\r\n\t\t\t)\r\n\t\t\t(CONNECT_DATA=(SERVICE_NAME=PRUEBA))\r\n\t\t\t)";
     $q->User = "{$usuario}";
     $q->Password = "{$contrasena}";
     $this->cursor = $q;
 }
开发者ID:johnfelipe,项目名称:orfeo,代码行数:22,代码来源:OracleConnection.php

示例5: _connect

 function _connect($argHostname, $argUsername, $argPassword, $argDatabasename, $mode = 0)
 {
     if (!function_exists('ora_plogon')) {
         return null;
     }
     // <G. Giunta 2003/03/03/> Reset error messages before connecting
     $this->_errorMsg = false;
     $this->_errorCode = false;
     // G. Giunta 2003/08/13 - This looks danegrously suspicious: why should we want to set
     // the oracle home to the host name of remote DB?
     //			if ($argHostname) putenv("ORACLE_HOME=$argHostname");
     if ($argHostname) {
         // code copied from version submitted for oci8 by Jorma Tuomainen <jorma.tuomainen@ppoy.fi>
         if (empty($argDatabasename)) {
             $argDatabasename = $argHostname;
         } else {
             if (strpos($argHostname, ":")) {
                 $argHostinfo = explode(":", $argHostname);
                 $argHostname = $argHostinfo[0];
                 $argHostport = $argHostinfo[1];
             } else {
                 $argHostport = "1521";
             }
             if ($this->connectSID) {
                 $argDatabasename = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=" . $argHostname . ")(PORT={$argHostport}))(CONNECT_DATA=(SID={$argDatabasename})))";
             } else {
                 $argDatabasename = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=" . $argHostname . ")(PORT={$argHostport}))(CONNECT_DATA=(SERVICE_NAME={$argDatabasename})))";
             }
         }
     }
     if ($argDatabasename) {
         $argUsername .= "@{$argDatabasename}";
     }
     //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>";
     if ($mode = 1) {
         $this->_connectionID = ora_plogon($argUsername, $argPassword);
     } else {
         $this->_connectionID = ora_logon($argUsername, $argPassword);
     }
     if ($this->_connectionID === false) {
         return false;
     }
     if ($this->autoCommit) {
         ora_commiton($this->_connectionID);
     }
     if ($this->_initdate) {
         $rs = $this->_query("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'");
         if ($rs) {
             ora_close($rs);
         }
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:53,代码来源:adodb-oracle.inc.php

示例6: putenv

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php 
//<meta http-equiv="Refresh" content="3;URL=http://www.algunsitio.com/nuevo.html">,
$servidor = "localhost";
$bd = "bdprueba";
$usuario = "root";
$contrasena = "jhlc";
putenv("ORACLE_SID=DBPRUEBA");
putenv("ORACLE_HOME=/oracle1/product/817");
$handle = ora_logon("fldoc@bdprueba", "Fldoc");
ora_commiton($handle);
$cursor = ora_open($handle);
$numeroa = 0;
$numero = 0;
$numeros = 0;
$numerot = 0;
$numerop = 0;
$numeroh = 0;
echo "<center>DocuImage - WEB <BR> CONTROL DOCUMENTOS DE CORRESPONDENCIA</center>";
echo "<table border=1 width=100%>";
echo "<td width=55%>";
echo "<br>";
$isql = "select USUA_LOGIN,USUA_PASW from usuario where USUA_LOGIN ='{$krd}'";
$resultado = ora_parse($cursor, $isql);
$resultado = ora_exec($cursor);
开发者ID:kractos26,项目名称:orfeo,代码行数:31,代码来源:cuerpo.php

示例7: putenv

<?php

$servicio = "bdprueba";
$dirora = "/oracle1/product/817";
$usuario = "fldoc";
$contrasena = "Fldoc";
putenv("ORACLE_SID={$servicio}");
putenv("ORACLE_HOME={$dirora}");
$handle = ora_logon("{$usuario}@{$servicio}", "{$contrasena}");
ora_commiton($handle);
if ($sololect) {
    $auxsololect = "S";
} else {
    $auxsololect = "N";
}
$isql = "select max(anex_numero) from anexos " . "where anex_radi_nume={$radi}";
$cursor = ora_open($handle);
ora_parse($cursor, $isql) or die("No se encontr&oacute; el radicado Buscado");
ora_exec($cursor);
$bien = ora_fetch($cursor);
$auxnumero = ora_getColumn($cursor, 0);
$auxnumero += 1;
$codigo = $radi . str_pad($auxnumero, 5, "0", STR_PAD_LEFT);
if ($bien) {
    $isql = "select anex_tipo_ext from anexos_tipo " . "where anex_tipo_codi={$tipo}";
    $cursor = ora_open($handle);
    ora_parse($cursor, $isql);
    ora_exec($cursor);
    $bien = ora_fetch($cursor);
    $extension = ora_getColumn($cursor, 0);
    $archivo = trim($radi . "_" . $auxnumero . "." . $extension);
开发者ID:BackupTheBerlios,项目名称:comeet-svn,代码行数:31,代码来源:anexosarchivo.php


注:本文中的ora_logon函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。