• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ibase_service_detach函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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 ? 'ibase_pconnect' : 'ibase_connect';
         $this->linkID[$linkNum] = $conn($config['hostname'] . '/' . $config['hostport'] . ':' . $config['database'], $config['username'], $config['password']);
         if (!$this->linkID[$linkNum]) {
             throw_exception(ibase_errmsg());
             return False;
         }
         //剑雷 2007.12.28
         if (($svc = ibase_service_attach($config['hostname'], $config['username'], $config['password'])) != FALSE) {
             $ibase_info = ibase_server_info($svc, IBASE_SVC_SERVER_VERSION) . '/' . ibase_server_info($svc, IBASE_SVC_IMPLEMENTATION);
             ibase_service_detach($svc);
         } else {
             $ibase_info = 'Unable to Determine';
         }
         $this->dbVersion = $ibase_info;
         // 标记连接成功
         $this->connected = true;
         // 注销数据库连接配置信息
         if (1 != C('DB_DEPLOY_TYPE')) {
             unset($this->config);
         }
     }
     return $this->linkID[$linkNum];
 }
开发者ID:skiman100,项目名称:thinksns,代码行数:38,代码来源:DbIbase.class.php


示例2: _backup

 /**
  * Export
  *
  * @param	string	$filename
  * @return	mixed
  */
 protected function _backup($filename)
 {
     if ($service = ibase_service_attach($this->db->hostname, $this->db->username, $this->db->password)) {
         $res = ibase_backup($service, $this->db->database, $filename . '.fbk');
         // Close the service connection
         ibase_service_detach($service);
         return $res;
     }
     return FALSE;
 }
开发者ID:NaszvadiG,项目名称:codeigniter-database-standalone,代码行数:16,代码来源:ibase_utility.php


示例3: version

 /**
  * Database version number
  *
  * @return	string
  */
 public function version()
 {
     if (isset($this->data_cache['version'])) {
         return $this->data_cache['version'];
     }
     if ($service = ibase_service_attach($this->hostname, $this->username, $this->password)) {
         $this->data_cache['version'] = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
         // Don't keep the service open
         ibase_service_detach($service);
         return $this->data_cache['version'];
     }
     return FALSE;
 }
开发者ID:aeduc,项目名称:mideteed,代码行数:18,代码来源:ibase_driver.php


示例4: _sql_close

 /**
  * Close sql connection
  * @access private
  */
 function _sql_close()
 {
     if ($this->service_handle !== false) {
         @ibase_service_detach($this->service_handle);
     }
     return @ibase_close($this->db_connect_id);
 }
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:11,代码来源:firebird.php


示例5: _connect

 /**
  * @brief DB 접속
  **/
 function _connect()
 {
     // db 정보가 없으면 무시
     if (!$this->hostname || !$this->port || !$this->userid || !$this->password || !$this->database) {
         return;
     }
     //if(strpos($this->hostname, ':')===false && $this->port) $this->hostname .= ':'.$this->port;
     // 접속시도
     $host = $this->hostname . "/" . $this->port . ":" . $this->database;
     $this->fd = @ibase_connect($host, $this->userid, $this->password);
     if (ibase_errmsg()) {
         $this->setError(ibase_errcode(), ibase_errmsg());
         return $this->is_connected = false;
     }
     // Firebird 버전 확인후 2.0 이하면 오류 표시
     if (($service = ibase_service_attach($this->hostname, $this->userid, $this->password)) != FALSE) {
         // get server version and implementation strings
         $server_info = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
         ibase_service_detach($service);
     } else {
         $this->setError(ibase_errcode(), ibase_errmsg());
         @ibase_close($this->fd);
         return $this->is_connected = false;
     }
     $pos = strpos($server_info, "Firebird");
     if ($pos !== false) {
         $ver = substr($server_info, $pos + strlen("Firebird"));
         $ver = trim($ver);
     }
     if ($ver < "2.0") {
         $this->setError(-1, "XE cannot be installed under the version of firebird 2.0. Current firebird version is " . $ver);
         @ibase_close($this->fd);
         return $this->is_connected = false;
     }
     // 접속체크
     $this->is_connected = true;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:40,代码来源:DBFirebird.class.php


示例6: getServerVersion

 /**
  * return version information about the server
  *
  * @param bool   $native  determines if the raw version string should be returned
  * @return mixed array/string with version information or MDB2 error object
  * @access public
  */
 function getServerVersion($native = false)
 {
     $server_info = false;
     if ($this->connected_server_info) {
         $server_info = $this->connected_server_info;
     } elseif ($this->options['server_version']) {
         $server_info = $this->options['server_version'];
     } else {
         $username = $this->options['DBA_username'] ? $this->options['DBA_username'] : $this->dsn['username'];
         $password = $this->options['DBA_password'] ? $this->options['DBA_password'] : $this->dsn['password'];
         $ibserv = @ibase_service_attach($this->dsn['hostspec'], $username, $password);
         $server_info = @ibase_server_info($ibserv, IBASE_SVC_SERVER_VERSION);
         @ibase_service_detach($ibserv);
     }
     if (!$server_info) {
         return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'Requires either "server_version" or "DBA_username"/"DBA_password" option', __FUNCTION__);
     }
     // cache server_info
     $this->connected_server_info = $server_info;
     if (!$native) {
         //WI-V1.5.3.4854 Firebird 1.5
         //WI-T2.1.0.16780 Firebird 2.1 Beta 2
         if (!preg_match('/-[VT]([\\d\\.]*)/', $server_info, $matches)) {
             return $this->raiseError(MDB2_ERROR_INVALID, null, null, 'Could not parse version information:' . $server_info, __FUNCTION__);
         }
         $tmp = explode('.', $matches[1], 4);
         $server_info = array('major' => isset($tmp[0]) ? $tmp[0] : null, 'minor' => isset($tmp[1]) ? $tmp[1] : null, 'patch' => isset($tmp[2]) ? $tmp[2] : null, 'extra' => isset($tmp[3]) ? $tmp[3] : null, 'native' => $server_info);
     }
     return $server_info;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:37,代码来源:ibase.php


示例7: _version

 /**
  * Version number query string
  *
  * @access  public
  * @return  string
  */
 function _version()
 {
     if (($svc = ibase_service_attach($this->hostname, $this->username, $this->password)) != FALSE) {
         $ibase_info = ibase_server_info($svc, IBASE_SVC_SERVER_VERSION) . '/' . ibase_server_info($svc, IBASE_SVC_IMPLEMENTATION);
         ibase_service_detach($svc);
     } else {
         $ibase_info = 'Unable to Determine';
     }
     return $ibase_info;
 }
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:16,代码来源:ibase_driver.php


示例8: getServerVersion

 /**
  * Retrieve server version in PHP style
  *
  * @return string
  */
 public function getServerVersion()
 {
     $this->_connect();
     $service = ibase_service_attach($this->_formatDbConnString($this->_config['host'], $this->_config['port'], ''), $this->_config['username'], $this->_config['password']);
     if ($service != FALSE) {
         $server_info = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
         ibase_service_detach($service);
         $matches = null;
         if (preg_match('/((?:[0-9]{1,2}\\.){1,3}[0-9]{1,2})/', $server_info, $matches)) {
             return $matches[1];
         } else {
             return null;
         }
     } else {
         return null;
     }
 }
开发者ID:2085020,项目名称:zendframework1,代码行数:22,代码来源:Firebird.php


示例9: backup

 public function backup($filename = '')
 {
     if ($service = ibase_service_attach($this->config['host'], $this->config['user'], $this->config['password'])) {
         $backup = ibase_backup($service, $this->config['database'], $filename . '.fbk');
         ibase_service_detach($service);
         return $backup;
     }
     return false;
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:9,代码来源:Ibase.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ibase_timefmt函数代码示例发布时间:2022-05-15
下一篇:
PHP ibase_service_attach函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap