This is an old revision of the document!
WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Get a value from an INI file
This function reads a configuration key value from an INI file. If the section and key are not found, the default value is returned.
$filename: Full path and name of the INI file
$section: Section inside the INI file
$key: Key name inside the section
$default: Value to be returned if the section and key are not found
Mixed: Value associated with the key, or the default value if the section and key are not found
The value will be of type string, integer or float depending on the data type of the default value.
Get the network mask from the Wattmon network configuration file:
<? $val=ini_get("/config/network.ini","network","netmask","255.255.255.0"); print($val); ?>
ini_get_array() - Get a group of parameters from an INI file as an array
ini_put_array() - Write the values from a key/value array to an INI file, with optional section
ini_set() - Write a value to a section in an INI file