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


PHP ocilogon函数代码示例

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


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

示例1: db_connect

 /**
  * Non-persistent database connection
  *
  * @access  private called by the base class
  * @return  resource
  */
 function db_connect()
 {
     // ====== Modificación por CRIE - UTP =======
     // Se agrega el parámetro utf8 a la función ocilogon para
     // forzar el uso de la codificación UTF-8 en Oracle
     return @ocilogon($this->username, $this->password, $this->hostname, 'utf8');
     // ========= Fin Modificación =========
 }
开发者ID:elgodmaster,项目名称:sigeca,代码行数:14,代码来源:oci8_driver.php

示例2: connect

 function connect($h, $u, $p)
 {
     $this->DBHost = $h;
     $this->DBUser = $u;
     $this->DBPassword = $p;
     $this->connection = ocilogon($this->DBUser, $this->DBPassword, $this->DBHost);
     return $this->connection;
 }
开发者ID:techczech,项目名称:tuit,代码行数:8,代码来源:driver-oci8.inc.php

示例3: phpOpenTracker_DB_oci8

 /**
  * Constructor.
  *
  * @access public
  */
 function phpOpenTracker_DB_oci8()
 {
     $this->phpOpenTracker_DB();
     $database = $this->config['db_database'] == 'default' ? '' : $this->config['db_database'];
     $this->connection = @ocilogon($this->config['db_user'], $this->config['db_password'], $database);
     if (!$this->connection) {
         return phpOpenTracker::handleError('Could not connect to database.', E_USER_ERROR);
     }
 }
开发者ID:span20,项目名称:Kallay,代码行数:14,代码来源:oci8.php

示例4: db_connect

 /**
  * Non-persistent database connection
  *
  * @access  private called by the base class
  * @return  resource
  */
 function db_connect()
 {
     //   print_r("hostname ".$this->hostname);
     //  print_r("pooled ".$this->pooled);
     //	return @ocilogon($this->username, $this->password, $this->hostname);
     $connection = ocilogon($this->username, $this->password, $this->pooled);
     if (!$connection) {
         $e = oci_error();
         print_r("<b>Error In Connection:</b>" . $e['message']);
     }
     return @ocilogon($this->username, $this->password, $this->pooled);
 }
开发者ID:Gobi09,项目名称:branboxAdmin,代码行数:18,代码来源:oci8_driver.php

示例5: oracle_login

function oracle_login($info, $serv_type)
{
    $conn_str = '( DESCRIPTION =
                    ( ADDRESS =
                        ( PROTOCOL = TCP )
                        ( HOST = ' . $info["HOST"] . ')
                        ( PORT = ' . $info["PORT"] . ') )
                    ( CONNECT_DATA =
                        ( SERVICE_NAME = ' . $info["BASE"] . ')
                        ( SERVER = ' . $serv_type . ') ) )';
    $c = @ocilogon($info["USER"], $info["PASS"], $conn_str);
    return $c;
}
开发者ID:enddo,项目名称:phpsploit,代码行数:13,代码来源:payload.php

示例6: da_sql_connect

function da_sql_connect($config)
{
    if ($config[sql_use_http_credentials] == 'yes') {
        global $HTTP_SERVER_VARS;
        $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
        $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
    } else {
        $SQL_user = $config[sql_username];
        $SQL_passwd = $config[sql_password];
    }
    $link = @ocilogon($SQL_user, $SQL_passwd, $config[sql_database]);
    $res = @da_sql_query($link, $config, "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM'");
    return $link;
}
开发者ID:greendev5,项目名称:freeradius-server-wasel,代码行数:14,代码来源:functions.php

示例7: Database

 function Database($Server = 0)
 {
     global $DB;
     settype($Server, "integer");
     $this->DBName = $DB->Name($Server);
     $this->DBPass = $DB->Pass($Server);
     $this->DBUser = $DB->User($Server);
     if (!isset($GLOBALS[md5($this->DBUser . $this->DBPass . $this->DBName)]) || !$GLOBALS[md5($this->DBUser . $this->DBPass . $this->DBName)]) {
         $GLOBALS[md5($this->DBUser . $this->DBPass . $this->DBName)] = @ocilogon($this->DBUser, $this->DBPass, $this->DBName);
     }
     $this->conn = $GLOBALS[md5($this->DBUser . $this->DBPass . $this->DBName)];
     if (!$this->conn) {
         $this->error($this->conn);
     }
     $this->version = @OCIServerVersion($this->conn);
 }
开发者ID:BackupTheBerlios,项目名称:phporacleadmin,代码行数:16,代码来源:database.lib.php

示例8: Connect

 function Connect()
 {
     if ($this->TYPE == 'oracle') {
         if (!($this->LINK = @ocilogon($this->USER, $this->PASS, $this->SERVER))) {
             return false;
         }
     } elseif ($this->TYPE == 'mysql') {
         if (!($this->LINK = @mysql_connect($this->SERVER, $this->USER, $this->PASS))) {
             return false;
         }
         if (!@mysql_select_db($this->DB)) {
             return false;
         }
     }
     return true;
 }
开发者ID:xlos88,项目名称:pastebin,代码行数:16,代码来源:class.bdd.php

示例9: sql_connect

 /**
  * Connect to server
  */
 function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
 {
     $this->persistency = $persistency;
     $this->user = $sqluser;
     $this->server = $sqlserver . ($port ? ':' . $port : '');
     $this->dbname = $database;
     $connect = $database;
     // support for "easy connect naming"
     if ($sqlserver !== '' && $sqlserver !== '/') {
         if (substr($sqlserver, -1, 1) == '/') {
             $sqlserver == substr($sqlserver, 0, -1);
         }
         $connect = $sqlserver . ($port ? ':' . $port : '') . '/' . $database;
     }
     $this->db_connect_id = $new_link ? @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8') : ($this->persistency ? @ociplogon($this->user, $sqlpassword, $connect, 'UTF8') : @ocilogon($this->user, $sqlpassword, $connect, 'UTF8'));
     return $this->db_connect_id ? $this->db_connect_id : $this->sql_error('');
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:20,代码来源:oracle.php

示例10: db_start

function db_start()
{
    global $DatabaseServer, $DatabaseUsername, $DatabasePassword, $DatabaseName, $DatabasePort, $DatabaseType;
    switch ($DatabaseType) {
        case 'oracle':
            $connection = @ocilogon($DatabaseUsername, $DatabasePassword, $DatabaseServer);
            break;
        case 'postgres':
            //if($DatabaseServer!='localhost') //use for windows
            if ($DatabaseServer != 'host') {
                //updated for linux
                $connectstring = "host={$DatabaseServer} ";
            }
            if ($DatabasePort != '5432') {
                $connectstring .= "port={$DatabasePort} ";
            }
            $connectstring .= "dbname={$DatabaseName} user={$DatabaseUsername}";
            if (!empty($DatabasePassword)) {
                $connectstring .= " password={$DatabasePassword}";
            }
            $connection = pg_connect($connectstring);
            break;
        case 'mysql':
            $connection = mysql_connect($DatabaseServer, $DatabaseUsername, $DatabasePassword);
            mysql_select_db($DatabaseName);
            break;
    }
    // Error code for both.
    if ($connection === false) {
        switch ($DatabaseType) {
            case 'oracle':
                $errors = OciError();
                $errormessage = $errors['message'];
                break;
            case 'postgres':
                $errormessage = pg_last_error($connection);
                break;
            case 'mysql':
                $errormessage = mysql_error($connection);
                break;
        }
        db_show_error("", "Could not Connect to Database: {$DatabaseServer}", $errstring);
    }
    return $connection;
}
开发者ID:SoftScape,项目名称:opensis,代码行数:45,代码来源:database.inc.php

示例11: db_start

function db_start()
{
    global $DatabaseServer, $DatabaseUsername, $DatabasePassword, $DatabaseName, $DatabasePort, $DatabaseType;
    switch ($DatabaseType) {
        case 'oracle':
            $connection = @ocilogon($DatabaseUsername, $DatabasePassword, $DatabaseServer);
            break;
        case 'postgres':
            if ($DatabaseServer != 'localhost') {
                $connectstring = "host={$DatabaseServer} ";
            }
            if ($DatabasePort != '5432') {
                $connectstring .= "port={$DatabasePort} ";
            }
            $connectstring .= "dbname={$DatabaseName} user={$DatabaseUsername}";
            if (!empty($DatabasePassword)) {
                $connectstring .= " password={$DatabasePassword}";
            }
            $connection = pg_connect($connectstring);
            break;
        case 'mysql':
            $connection = mysql_connect($DatabaseServer, $DatabaseUsername, $DatabasePassword);
            mysql_select_db($DatabaseName);
            break;
    }
    // Error code for both.
    if ($connection === false) {
        switch ($DatabaseType) {
            case 'oracle':
                $errors = OciError();
                $errormessage = $errors['message'];
                break;
            case 'postgres':
                $errormessage = pg_last_error($connection);
                break;
            case 'mysql':
                $errormessage = mysql_error($connection);
                break;
        }
        // TRANSLATION: do NOT translate these since error messages need to stay in English for technical support
        db_show_error("", sprintf('Could not Connect to Database Server \'%s\'', $DatabaseServer), $errstring);
    }
    return $connection;
}
开发者ID:linil,项目名称:centreSIS,代码行数:44,代码来源:database.inc.php

示例12: 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

示例13: sql_connect

 /**
  * {@inheritDoc}
  */
 function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
 {
     $this->persistency = $persistency;
     $this->user = $sqluser;
     $this->server = $sqlserver . ($port ? ':' . $port : '');
     $this->dbname = $database;
     $connect = $database;
     // support for "easy connect naming"
     if ($sqlserver !== '' && $sqlserver !== '/') {
         if (substr($sqlserver, -1, 1) == '/') {
             $sqlserver == substr($sqlserver, 0, -1);
         }
         $connect = $sqlserver . ($port ? ':' . $port : '') . '/' . $database;
     }
     if ($new_link) {
         if (!function_exists('ocinlogon')) {
             $this->connect_error = 'ocinlogon function does not exist, is oci extension installed?';
             return $this->sql_error('');
         }
         $this->db_connect_id = @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8');
     } else {
         if ($this->persistency) {
             if (!function_exists('ociplogon')) {
                 $this->connect_error = 'ociplogon function does not exist, is oci extension installed?';
                 return $this->sql_error('');
             }
             $this->db_connect_id = @ociplogon($this->user, $sqlpassword, $connect, 'UTF8');
         } else {
             if (!function_exists('ocilogon')) {
                 $this->connect_error = 'ocilogon function does not exist, is oci extension installed?';
                 return $this->sql_error('');
             }
             $this->db_connect_id = @ocilogon($this->user, $sqlpassword, $connect, 'UTF8');
         }
     }
     return $this->db_connect_id ? $this->db_connect_id : $this->sql_error('');
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:40,代码来源:oracle.php

示例14: connect

 function connect($dsn = false)
 {
     $this->lasterr = null;
     $this->lasterrcode = null;
     if ($this->conn && $dsn == false) {
         return true;
     }
     if (!$dsn) {
         $dsn = $this->dsn;
     } else {
         $this->dsn = $dsn;
     }
     if (isset($dsn['charset']) && $dsn['charset'] != '') {
         $charset = $dsn['charset'];
     } else {
         $charset = FLEA::getAppInf('databaseCharset');
     }
     if (strtoupper($charset) == 'GB2312') {
         $charset = 'GBK';
     }
     if (empty($dsn['database'])) {
         $dsn['database'] = null;
     }
     if ($charset != '') {
         $this->conn = ocilogon("{$dsn['login']}", $dsn['password'], $dsn['database'], $charset);
     } else {
         $this->conn = ocilogon($dsn['login'], $dsn['password'], $dsn['database']);
     }
     if (!$this->conn) {
         FLEA::loadClass('FLEA_Db_Exception_SqlQuery');
         $err = ocierror();
         __THROW(new FLEA_Db_Exception_SqlQuery("ocilogon('{$dsn['login']}') failed.", $err['message'], $err['code']));
         return false;
     }
     $this->execute("ALTER SESSION SET NLS_DATE_FORMAT = '{$this->NLS_DATE_FORMAT}'");
     return true;
 }
开发者ID:uwitec,项目名称:01technology,代码行数:37,代码来源:Oracle.php

示例15: ocilogon

<?php
$Conn = ocilogon($dbuser, $dbpass, $hostname, $encode);

?>	
开发者ID:pingkunga,项目名称:cp342-computer777,代码行数:4,代码来源:function.inc.php


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