XXII. DBM Functions [deprecated]

Wstęp

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

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

Wymagania

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

Instalacja

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.

Konfiguracja czasu wykonywania

To rozszerzenie nie definiuje posiada żadnych dyrektyw konfiguracyjnych w pliku php.ini.

Typy zasobów

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

Stałe predefinopwane

To rozszerzenie nie posiada żadnych stałych.

Przykłady

Przykład 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);

?>

Spis treści
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


Język PHP to dzisiaj powszechnie przyjęty standard, podstawa tworzenia dynamicznych stron WWW, opartych na bazach danych.

PHP to język skryptowy. Znaczy to, że jest to język nie kompilowalny. Program jest wykonywany przez interpreter na podstawie jego kodu źródłowego. Język PHP to element technologii internetowej SERVER-SIDE. Znaczy to, że kod języka jest wykonywany od strony serwera (na serwerze).

W jakim celu używac PHP? Po co to komu?

Załóżmy, że potrzebujemy takiej strony internetowej, która wyświetli zawsze bieżącą datę. Dzięki technologii PHP, datę i godzinę odczytywać można z miejsca gdzie wykonuje się skrypt, np. gdy serwer znajduje się w USA a my w Polsce to widoczna jest różnica w czasie który zostanie wyświetlony.

noni pozycjonowanie hosting ser działki gdańsk kanapy wypoczynkowe architekturawizy do rosji gdańsk, wizy do rosji, wizy do rosji gdańsk, wizy do rosji, usuwanie zmarszczek, usuwanie zmarszczek, Nowa Sól, Noclegi w Polsce