User Tools

Site Tools


uphp:functions:nvram_set

nvram_set

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Set a key and value in NVRAM

Description

int nvram_set ( string $key, string $value )

Set a value in NVRAM for a particular key. If the key already exists it will be overwritten.

Parameters

$key: String variable name to set associated value for

$value: String value to set. If you wish to set a numeric value, first convert it to a string using strval() or number_format().

Return Values

Integer: 1 on success, or 0 on failure

Example

<?
  $res=nvram_set("myvariable","Test");
  if (!$res) print("Error saving NVRAM key/value");
?>

See Also

nvram_get() - Get a value from NVRAM

uphp/functions/nvram_set.txt · Last modified: 2021/09/13 05:57 (external edit)