PHP 매뉴얼
이전 |  | 다음

# XIX. DBM Functions [deprecated]

# 소개

These functions allow you to store records stored in a dbm-style database. This type of database (supported by the Berkeley DB, GDBM, and some system libraries, as well as a built-in flatfile library) stores key/value pairs (as opposed to the full-blown records supported by relational databases).

> 참고: However, dbm support is deprecated and you are encouraged to use the Database (dbm-style) abstraction layer functions instead.

> 참고: 이 확장 모듈은 PHP 5에서 제거되어, PECL로 이동되었습니다.

# 요구 사항

To use this functions you have to compile PHP with support for an underlying database. See the list of supported Databases.

# 설치

In order to use these functions, you must compile PHP with dbm support by using the `--with-db` option. In addition you must ensure support for an underlying database or you can use some system libraries.

# 런타임 설정

이 확장 모듈은 `php.ini` 설정이 존재하지 않습니다.

# 리소스 종류

The function dbmopen() returns an database identifier which is used by the other dbm-functions.

# 상수 정의

이 확장 모듈은 상수를 정의하지 않습니다.

# 예제

예 1. DBM example

`<?php $dbm = dbmopen("lastseen", "w"); if (dbmexists($dbm, $userid)) { $last_seen = dbmfetch($dbm, $userid); } else { dbminsert($dbm, $userid, time()); } do_stuff(); dbmreplace($dbm, $userid, time()); dbmclose($dbm); ?>`

이전 | 처음으로 | 다음
dbase_replace_record | 위로 | dblist