PHP8 dba_handlers

2024-03-20 10:27 更新

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

dba_handlers — 列出所有可用的處理程序

說明

dba_handlers(bool $full_info = false): array

dba_handlers() 列出此支持的所有處理程序 外延。

參數(shù) 

full_info

打開/關(guān)閉結(jié)果中的完整信息顯示。

返回值 

返回?cái)?shù)據(jù)庫處理程序的數(shù)組。如果設(shè)置為 true,則數(shù)組將與處理程序名稱關(guān)聯(lián) 鍵及其版本信息作為值。否則,結(jié)果將是 處理程序名稱的索引數(shù)組。full_info

注意:使用內(nèi)部 cdb 庫時(shí),您將看到 和 。cdbcdb_make

示例 

示例 #1 dba_handlers() Example

<?php

echo "Available DBA handlers:\n";
foreach (dba_handlers(true) as $handler_name => $handler_version) {
  // clean the versions
  $handler_version = str_replace(', '', $handler_version); 
  echo " - $handler_name: $handler_version\n"; } 
?>

以上示例的輸出類似于:

Available DBA handlers:
 - cdb: 0.75, Revision: 1.3.2.3 
 - cdb_make: 0.75, Revision: 1.2.2.4 
 - db2: Sleepycat Software: Berkeley DB 2.7.7: (08/20/99)
 - inifile: 1.0, Revision: 1.6.2.3 
 - flatfile: 1.0, Revision: 1.5.2.4


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)