dba_handlers

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

dba_handlers — 사용 가능한 모든 핸들러 나열


설명

dba_handlers(bool $full_info = false): array

dba_handlers()는 이 확장에서 지원하는 모든 핸들러를 나열합니다.


매개변수

full_info
결과에서 전체 정보 표시를 켜거나 끕니다.

반환 값

데이터베이스 처리기의 배열을 반환합니다. full_infotrue로 설정되면 배열은 핸들러 이름을 키로 연결하고 해당 버전 정보를 값으로 연결합니다. 그렇지 않으면 결과는 처리기 이름의 인덱스 배열이 됩니다.

메모: 내부 cdb 라이브러리가 사용되면 cdbcdb_make가 표시됩니다.


Examples

예제 #1 dba_handlers() 예제

                  
<?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