User Tools

Site Tools


uphp:functions:ini_set

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:ini_set [2017/04/13 13:30]
jeff
uphp:functions:ini_set [2021/09/13 05:57] (current)
Line 7: Line 7:
 ====Description==== ====Description====
  
-<well size="sm"> +<well size="sm"><html>
-<html>+
 <span style="font-size:125%;color:green">int <span style="font-size:125%;color:green">int
-<span style="color:black"> +<span style="color:black">ini_set (
-</html> +
-[[ini_set]] ( +
-<html>+
 <span style="color:green">string <span style="color:green">string
 <span style="color:blue">$filename<span style="color:black">, <span style="color:blue">$filename<span style="color:black">,
Line 23: Line 19:
 <span style="color:blue">$value <span style="color:blue">$value
 <span style="color:black">) <span style="color:black">)
-</html> +</html></well>
-</well>+
  
 This function writes a configuration key/value pair to an INI file. This function writes a configuration key/value pair to an INI file.
  
-<html>If the INI file does not already exist it is created with <b><span style="color:blue">$section<span style="color:black"></b>, <b><span style="color:blue">$key<span style="color:black"></b> and <b><span style="color:blue">$value<span style="color:black"></b>. However, if the INI file already exists it is updated only for the specified <b><span style="color:blue">$section<span style="color:black"></b>, <b><span style="color:blue">$key<span style="color:black"></b> and <b><span style="color:blue">$value<span style="color:black"></b>, which preserves any other information, sections, keys or values that might be in the file to begin with.</html>+<html>If the INI file does not already exist it is created with the given <b><span style="color:blue">section<span style="color:black"></b>, <b><span style="color:blue">key<span style="color:black"></b> and <b><span style="color:blue">value<span style="color:black"></b>. However, if the INI file already exists it is updated only for the specified <b><span style="color:blue">section<span style="color:black"></b>, <b><span style="color:blue">key<span style="color:black"></b> and <b><span style="color:blue">value<span style="color:black"></b>, which preserves any other information, sections, keys or values that might be in the file to begin with.</html>
  
-<html>If <b><span style="color:blue">$section<span style="color:black"></b> does not exist it is appended to the end of the file along with <b><span style="color:blue">$key<span style="color:black"></b> and <b><span style="color:blue">$value<span style="color:black"></b>.</html>+<html>If the <b><span style="color:blue">section<span style="color:black"></b> does not exist it is appended to the end of the file along with the <b><span style="color:blue">key<span style="color:black"></b> and <b><span style="color:blue">value<span style="color:black"></b>.</html>
  
-<html>If <b><span style="color:blue">$key<span style="color:black"></b> does not exist it is added to <b><span style="color:blue">$section<span style="color:black"></b>, if it exists, otherwise the <b><span style="color:blue">$section<span style="color:black"></b>, <b><span style="color:blue">$key<span style="color:black"></b> and <b><span style="color:blue">$value<span style="color:black"></b> are appended to the end of the file.</html>+<html>If the <b><span style="color:blue">key<span style="color:black"></b> does not exist it is added to the <b><span style="color:blue">section<span style="color:black"></b>, if it exists, otherwise the <b><span style="color:blue">section<span style="color:black"></b>, <b><span style="color:blue">key<span style="color:black"></b> and <b><span style="color:blue">value<span style="color:black"></b> are appended to the end of the file.</html> 
 + 
 +=== Clearing a Key === 
 + 
 +By specifying a blank ('') value for the key, the key and value will be erased from the ini file.
  
 ====Parameters==== ====Parameters====
Line 40: Line 39:
 <html><b><span style="color:blue">$section<span style="color:black"></b></html>:  Name of the section inside the INI file <html><b><span style="color:blue">$section<span style="color:black"></b></html>:  Name of the section inside the INI file
  
-<html><b><span style="color:blue">$key<span style="color:black"></b>:  Name of the key inside <b><span style="color:blue">$section<span style="color:black"></b></html>+<html><b><span style="color:blue">$key<span style="color:black"></b>:  Name of the key inside the <b><span style="color:blue">section<span style="color:black"></b></html>
  
 <html><b><span style="color:blue">$value<span style="color:black"></b>:  The value to write (<b><span style="color:green">string<span style="color:black"></b>, <b><span style="color:green">int<span style="color:black"></b> or <b><span style="color:green">float<span style="color:black"></b>)</html> <html><b><span style="color:blue">$value<span style="color:black"></b>:  The value to write (<b><span style="color:green">string<span style="color:black"></b>, <b><span style="color:green">int<span style="color:black"></b> or <b><span style="color:green">float<span style="color:black"></b>)</html>
  
-====Return Value====+====Return Values====
  
 <html><b><span style="color:green">Integer<span style="color:black"></b></html>:  1 on success or 0 on failure <html><b><span style="color:green">Integer<span style="color:black"></b></html>:  1 on success or 0 on failure
uphp/functions/ini_set.1492090240.txt.gz · Last modified: 2021/09/13 05:56 (external edit)