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


PHP oci_server_version函数代码示例

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


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

示例1: getAttribute

 public function getAttribute($attribute, &$source = null, $func = 'PDO::getAttribute', &$last_error = null)
 {
     switch ($attribute) {
         case PDO::ATTR_AUTOCOMMIT:
             return $this->autocommit;
             break;
         case PDO::ATTR_PREFETCH:
             break;
         case PDO::ATTR_CLIENT_VERSION:
             return oci_server_version($this->link);
             break;
         case PDO::ATTR_SERVER_VERSION:
             $ver = oci_server_version($this->link);
             if (preg_match('/([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/', $ver, $match)) {
                 return $match[1];
             }
             return $ver;
             break;
         case PDO::ATTR_SERVER_INFO:
             return oci_server_version($this->link);
             break;
         default:
             return parent::getAttribute($attribute, $source, $func, $last_error);
             break;
     }
 }
开发者ID:Deepab23,项目名称:clinic,代码行数:26,代码来源:oci.php

示例2: getServerVersion

 /**
  * {@inheritdoc}
  *
  * @throws \UnexpectedValueException if the version string returned by the database server
  *                                   does not contain a parsable version number.
  */
 public function getServerVersion()
 {
     if (!preg_match('/\\s+(\\d+\\.\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+/', oci_server_version($this->dbh), $version)) {
         throw new \UnexpectedValueException(sprintf('Unexpected database version string "%s". Cannot parse an appropriate version number from it. ' . 'Please report this database version string to the Doctrine team.', oci_server_version($this->dbh)));
     }
     return $version[1];
 }
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:13,代码来源:OCI8Connection.php

示例3: getServerVersion

 /**
  * Returns oracle version.
  *
  * @throws \UnexpectedValueException if the version string returned by the database server does not parsed
  * @return int Version number
  */
 public function getServerVersion()
 {
     $versionData = oci_server_version($this->dbh);
     if (!preg_match('/\\s+(\\d+\\.\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+/', $versionData, $version)) {
         throw new \UnexpectedValueException(__('Unexpected database version string "{0}" that not parsed.', $versionData));
     }
     return $version[1];
 }
开发者ID:cakedc,项目名称:cakephp-oracle-driver,代码行数:14,代码来源:OCI8Connection.php

示例4: connect

 /**
 +----------------------------------------------------------
 * 连接数据库方法
 +----------------------------------------------------------
 * @access public
 +----------------------------------------------------------
 * @throws ThinkExecption
 +----------------------------------------------------------
 */
 public function connect($config = '', $linkNum = 0)
 {
     if (!isset($this->linkID[$linkNum])) {
         if (empty($config)) {
             $config = $this->config;
         }
         $conn = $this->pconnect ? 'oci_pconnect' : 'oci_new_connect';
         $this->linkID[$linkNum] = $conn($config['username'], $config['password'], "//{$config['hostname']}:{$config['hostport']}/{$config['database']}");
         //modify by wyfeng at 2008.12.19
         if (!$this->linkID[$linkNum]) {
             $error = $this->error(false);
             throw_exception($error["message"], '', $error["code"]);
             return false;
         }
         $this->dbVersion = oci_server_version($this->linkID[$linkNum]);
         // 标记连接成功
         $this->connected = true;
         //注销数据库安全信息
         if (1 != C('DB_DEPLOY_TYPE')) {
             unset($this->config);
         }
     }
     return $this->linkID[$linkNum];
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:33,代码来源:DbOracle.class.php

示例5: sql_server_info

	/**
	* Version information about used database
	* @param bool $raw if true, only return the fetched sql_server_version
	* @return string sql server version
	*/
	function sql_server_info($raw = false) {
		$this->sql_server_version = @oci_server_version($this->connect);

		return $this->sql_server_version;
	}
开发者ID:nopticon,项目名称:rockr,代码行数:10,代码来源:class.oracle.php

示例6: getServerVersion

 public function getServerVersion()
 {
     set_error_handler(static::getErrorHandler());
     $serverVersion = oci_server_version($this->resource);
     restore_error_handler();
     return $serverVersion;
 }
开发者ID:jpina,项目名称:oci8,代码行数:7,代码来源:Oci8Connection.php

示例7: getServerVersion

 /**
  * @return string Version information from the database
  */
 function getServerVersion()
 {
     //better version number, fallback on driver
     $rset = $this->doQuery('SELECT version FROM product_component_version WHERE UPPER(product) LIKE \'ORACLE DATABASE%\'');
     if (!($row = $rset->fetchRow())) {
         return oci_server_version($this->mConn);
     }
     return $row['version'];
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:DatabaseOracle.php

示例8: getDbInfo

 /**
  * @return array|mixed
  */
 public function getDbInfo()
 {
     $arrReturn = array();
     $arrReturn["dbdriver"] = "oci8-oracle-extension";
     $arrReturn["dbserver"] = oci_server_version($this->linkDB);
     $arrReturn["dbclient"] = function_exists("oci_client_version") ? oci_client_version($this->linkDB) : "";
     return $arrReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:11,代码来源:class_db_oci8.php

示例9: _version

 /**
  * Version number query string
  *
  * @access  protected
  * @return  string
  */
 protected function _version()
 {
     return oci_server_version($this->conn_id);
 }
开发者ID:wiliamdecosta,项目名称:ifalconi_oci_responsive,代码行数:10,代码来源:oci8_driver.php

示例10: versionOracle

function versionOracle()
{
    ///////////////////////
    ///////////////////////
    //////////////////////
    // TODO EN PDO
    $conn = oci_connect('scott', 'tiger', '10.0.220.100:1521/ORAPROF');
    $version = oci_server_version($conn);
    oci_close($conn);
    return $version;
}
开发者ID:erwanLeGuen,项目名称:PPE,代码行数:11,代码来源:AccesDonnees.php

示例11: version

 public function version()
 {
     if (!empty($this->connect)) {
         return oci_server_version($this->connect);
     } else {
         return false;
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:8,代码来源:Oracle.php

示例12: server_info

 /**
  * 获取服务器信息
  *
  * @return string 服务器信息
  */
 public function server_info()
 {
     return oci_server_version($this->db_link);
 }
开发者ID:laiello,项目名称:hecart,代码行数:9,代码来源:oci.php

示例13: getDbInfo

 public function getDbInfo()
 {
     return array("Server version" => @oci_server_version($this->database), "Express" => $this->isExpress());
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:4,代码来源:OracleManager.php

示例14: php_sql

 function php_sql()
 {
     $get_version = explode("-", oci_server_version($this->dbh));
     return "ENV: php " . phpversion() . "[Oracle " . $get_version[0] . "]";
 }
开发者ID:chaobj001,项目名称:tt,代码行数:5,代码来源:DBOracle.class.php

示例15: ServerInfo

 function ServerInfo()
 {
     $arr['compat'] = $this->GetOne('select value from sys.database_compatible_level');
     $arr['description'] = @oci_server_version($this->_connectionID);
     $arr['version'] = ADOConnection::_findvers($arr['description']);
     return $arr;
 }
开发者ID:advancingdesign,项目名称:ADOdb,代码行数:7,代码来源:adodb-oci8.inc.php


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