k2hpx_da_set_value_from_file k2hash Functions k2hpx_da_set_write_offset

k2hpx_da_set_value

Sets value

Description

bool k2hpx_da_set_value ( mixed $dahandle_res , string $value [, int $offset ] )

Sets value using the offset.

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 true on success or false on failure.

Examples

<?php
$handle = k2hpx_open_mem();
k2hpx_set_value($handle, "test", "value");
$dahandle = k2hpx_da_get_handle_rw($handle, "test");
var_dump(k2hpx_da_set_value($dahandle, "value", 20));
var_dump(k2hpx_da_get_value($dahandle, 20));
k2hpx_da_free($dahandle);
k2hpx_close($handle);
?>

The above example will output:

bool(true)
string(5) "value"

See Also

k2hpx_da_set_value_from_file k2hash Functions k2hpx_da_set_write_offset