User Tools

Site Tools


uphp:functions:ini_get

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_get [2017/04/13 07:27]
jeff
uphp:functions:ini_get [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">mixed <span style="font-size:125%;color:green">mixed
-<span style="color:black"> +<span style="color:black">ini_get (
-</html> +
-[[ini_get]] ( +
-<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">$default <span style="color:blue">$default
 <span style="color:black">) <span style="color:black">)
-</html> +</html></well>
-</well>+
  
 <html>This function reads a configuration <b><span style="color:blue">key<span style="color:black"></b> value from an INI file. If the <b><span style="color:blue">section<span style="color:black"></b> and <b><span style="color:blue">key<span style="color:black"></b> are not found, the <b><span style="color:blue">default<span style="color:black"></b> value is returned.</html> <html>This function reads a configuration <b><span style="color:blue">key<span style="color:black"></b> value from an INI file. If the <b><span style="color:blue">section<span style="color:black"></b> and <b><span style="color:blue">key<span style="color:black"></b> are not found, the <b><span style="color:blue">default<span style="color:black"></b> value is returned.</html>
Line 32: Line 27:
 <html><b><span style="color:blue">$filename<span style="color:black"></b></html>:  Full path and name of the INI file <html><b><span style="color:blue">$filename<span style="color:black"></b></html>:  Full path and name of the INI file
  
-<html><b><span style="color:blue">$section<span style="color:black"></b></html>:  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>:  Key name inside the <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">$default<span style="color:black"></b>:  Value to be returned if the <b><span style="color:blue">section<span style="color:black"></b> and <b><span style="color:blue">key<span style="color:black"></b> are not found</html> <html><b><span style="color:blue">$default<span style="color:black"></b>:  Value to be returned if the <b><span style="color:blue">section<span style="color:black"></b> and <b><span style="color:blue">key<span style="color:black"></b> are not found</html>
  
-====Return Value====+====Return Values====
  
 <html><b><span style="color:green">Mixed<span style="color:black"></b>:  Value associated with the <b><span style="color:blue">key<span style="color:black"></b>, or the <b><span style="color:blue">default<span style="color:black"></b> value if the <b><span style="color:blue">section<span style="color:black"></b> and <b><span style="color:blue">key<span style="color:black"></b> are not found</html> <html><b><span style="color:green">Mixed<span style="color:black"></b>:  Value associated with the <b><span style="color:blue">key<span style="color:black"></b>, or the <b><span style="color:blue">default<span style="color:black"></b> value if the <b><span style="color:blue">section<span style="color:black"></b> and <b><span style="color:blue">key<span style="color:black"></b> are not found</html>
  
-<html>The value will be of type <b><span style="color:green">string<span style="color:black"></b>, <b><span style="color:green">integer<span style="color:black"></b> or <b><span style="color:green">float<span style="color:black"></b> depending on the data type of the <b><span style="color:blue">default<span style="color:black"></b> value.</html>+<html>The value will be of type <b><span style="color:green">string<span style="color:black"></b>, <b><span style="color:green">integer<span style="color:black"></b> or <b><span style="color:green">float<span style="color:black"></b> depending on the data type of the <b><span style="color:blue">key<span style="color:black"></b> value (or the data type of the <b><span style="color:blue">default<span style="color:black"></b> value if the <b><span style="color:blue">section<span style="color:black"></b> or <b><span style="color:blue">key<span style="color:black"></b> is not found).</html>
  
 ====Example==== ====Example====
Line 59: Line 54:
 [[ini_get_array()]] - Get a group of parameters from an INI file as an <html><b><span style="color:green">array<span style="color:black"></b></html> [[ini_get_array()]] - Get a group of parameters from an INI file as an <html><b><span style="color:green">array<span style="color:black"></b></html>
  
-[[ini_put_array()]] - Write the values from key/value <html><b><span style="color:green">array<span style="color:black"></b></html> to an INI file, with optional section+[[ini_put_array()]] - Write a group of parameters to an INI file from an <html><b><span style="color:green">array<span style="color:black"></b></html>
  
-[[ini_set()]] - Write a value to a section in an INI file+[[ini_set()]] - Set a value in an INI file
  
uphp/functions/ini_get.1492068431.txt.gz · Last modified: 2021/09/13 05:56 (external edit)