K2hash::getValue K2hash Class K2hash::open

K2hash::loadArchive

Loads data from the file

Description

 public bool K2hash::loadArchive ( string $filepath [, bool $errskip ] )

Loads data from the file. The file should be either a transaction file or an archive file.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php
$k2hash = new K2hash();
$k2hash->openMem();
$k2hash->setValue("key1", "value1");
var_dump($k2hash->putArchive("/tmp/test_k2h_archive", true));
$k2hash->close();

$k2hash2 = new K2hash();
$k2hash2->openMem();
$k2hash2->loadArchive("/tmp/test_k2h_archive", true);
var_dump($k2hash2->getValue("key1"));
$k2hash2->close();
?>

The above example will output:

bool(true)
string(6) "value1"

See Also

K2hash::getValue K2hash Class K2hash::open