Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | PHP | LIB_MIO_WLIB_PHP | settingsSetSimpleValue SEARCH    

  Functions
comma
copy
count
disk_file_list
disk_file_load
disk_file_save
disk_folder_copy
disk_folder_list
disk_folder_remove
explode
get_baseURL
get_currentPath
implode
mioDb_connect
mioDb_query
mioxml_getElement
mioxml_getElementArray
mioxml_getOuter
settingsSetSimpleValue
settingsStringToArray
settingsToArray
strlen
strpos
strrpos
strtolower
strtotime
strtoupper
str_decrypt
str_encrypt
str_posEx
str_replace
str_split
substr

  Libraries
miodb_lib.php
mio_wlib.php
stats_read.php
stats_write.php

Function
settingsSetSimpleValue

Language: PHP


Syntax

settingsSetSimpleValue(Filename, VariableName, Value)


Parameters

STRINGFilenameName of the settings file.
STRINGVariableNameName of the variable to update or to add.
STRINGValueValue to save.


Return value

String



Description

Set the value of a variable in a configuration file.

Example

A file settings.mem is as follow:


variable1=value1
variable2=value2



To change the value of the first variable:


settingsSetSimpleValue("settings.mem", "variable1", "newValue");



After the call of the function, the settings file will look as follow:


variable1=newValue
variable2=value2



For more information about configuration files: {link:SETTINGSTOARRAY} and {link:SETTINGSSTRINGTOARRAY}.