English
欢迎访问www.CanadaSky.com,本站快捷网址:www.caSky.com
本站免费二级域名:YourName.caSky.com
帮助信息 服务条款
网站简介 隐私保护
客户服务 联系我们
免费注册 忘记密码
电脑技术文档索引 Red Hat Linux 9 设置指南 Red Hat Linux 9 入门指南 Red Hat Linux 9 安装指南 FreeBSD中文参考手册
PHP参考手册 Apache 2 中文参考手册 MySQL4.1中文参考手册 QMail中文参考手册 PostgreSQL 8.0.0 中文文档

DBM Functions [deprecated]

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.

运行时配置

该扩展模块未定义任何设置指令。

资源类型

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);

?>

目录
dblist --  Describes the DBM-compatible library being used
dbmclose -- Closes a dbm database
dbmdelete --  Deletes the value for a key from a DBM database
dbmexists --  Tells if a value exists for a key in a DBM database
dbmfetch --  Fetches a value for a key from a DBM database
dbmfirstkey --  Retrieves the first key from a DBM database
dbminsert --  Inserts a value for a key in a DBM database
dbmnextkey --  Retrieves the next key from a DBM database
dbmopen -- Opens a DBM database
dbmreplace --  Replaces the value for a key in a DBM database


自动支持 1024x768 和 800x600 最佳页面显示效果, 请使用IE4.0以上浏览器浏览本站
版权所有© 2002-2005 加拿大晴空网 网站简介 帮助信息 服务条款 隐私保护 广告业务 客户服务 联系我们