k2hpx_da_get_handle_write k2hash Functions k2hpx_da_get_length

k2hpx_da_get_handle

Gets the k2hash direct access file handle

Description

mixed k2hpx_da_get_handle ( mixed $handle_res , string $key , int $mode )

Gets the k2hash direct access file handle with arbitrary mode: ‘K2H_DA_READ’ (read-only), ‘K2H_DA_RW’ (read-write) or ‘K2H_DA_WRITE’ (write).

Note

The k2hash direct access handle is a handler to provide quick access to the specific part of large data using offset.

Parameters

Return Values

Returns the k2hash direct access file handle.

Examples

<?php
$handle = k2hpx_open_mem();
k2hpx_set_value($handle, "test", "value");
$dahandle = k2hpx_da_get_handle($handle, "test", K2H_DA_READ);
var_dump(k2hpx_da_free($dahandle));
k2hpx_close($handle);
?>

The above example will output:

resource(5) of type (k2hdahandle)

See Also

k2hpx_da_get_handle_write k2hash Functions k2hpx_da_get_length