PHP Doku:: Creates a chdb file - function.chdb-create.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteConstant hash databasechdb Funktionenchdb_create

Ein Service von Reinhard Neidl - Webprogrammierung.

chdb Funktionen

<<chdb Funktionen

CURL>>

chdb_create

(PECL chdb >= 0.1.0)

chdb_createCreates a chdb file

Beschreibung

void chdb_create ( string $pathname , array $data )

chdb_create() creates a chdb file containing the specified key-value pairs.

Hinweis:

chdb files are not portable across little-endian and big-endian environments. Except for that, they are portable across different architectures. Also compatibility across different versions of chdb is not guaranteed.

Parameter-Liste

pathname

The name of the file to create.

If a file with the same name already exists, it is overwritten.

data

An array containing the key-value pairs to store in the chdb file.

Keys and values are converted to strings before being written to the file, as chdb only support the string type. Note that binary strings are supported as well, both as keys and values.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Fehler/Exceptions

Throws an exception in case the chdb file hasn't been successfully created.

Beispiele

Beispiel #1 chdb_create() example

<?php

$data 
= array(
    
'key1' => 'value1',
    
'key2' => 'value2',
    
// ...
);
chdb_create('data.chdb'$data);

?>

The above example will generate a chdb file named data.chdb and containing the key-value pairs defined in $data.


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)