User Tools

Site Tools


uphp:functions:sys_set

Differences

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

Link to this comparison view

uphp:functions:sys_set [2024/07/16 03:41] (current)
admin created
Line 1: Line 1:
 +======sys_set======
 +
 +<badge>FW >= 1300</badge>
 +
 +Set a system parameter
 +
 +====Description====
 +
 +<well size="sm"><html>
 +<span style="font-size:125%;color:green">int
 +<span style="color:black">sys_set (
 +<span style="color:green">string
 +<span style="color:blue">$parameter
 +<span style="color:black">,
 +<span style="color:green">int
 +<span style="color:blue">$value
 +<span style="color:black">)
 +</html></well>
 +
 +This function will set an internal parameter
 +
 +====Parameters====
 +
 +<html><b><span style="color:blue">$parameter<span style="color:black"></b>:  The $parameter must be one of the following:</html>
 +^ Parameter                     ^ Description                                       ^
 +| force_log            | Set to 1 to trigger a log event                         |
 +| FLASH_WP             | Set to 1 to write protect the flash, and 0 to allow writes  |
 +====Note====
 +
 +<html>The parameters are case sensitive - not all parameters will be available, depending on the hardware (i.e. Flash may not be onboard).</html>
 +
 +====Return Values====
 +
 +
 +====Examples====
 +
 +<code php>
 +<pre><?
 +  
 +  // this will fail on the flash drive as it is locked by default at boot
 +  
 +  ini_set("1:/config/myinifile.ini","config","value",1);
 +  
 +  // unlock flash
 +  sys_set("FLASH_WP",0);
 +  
 +  // this will succeed
 +  ini_set("1:/config/myinifile.ini","config","value",1);
 +  
 +  // re-lock
 +  sys_set("FLASH_WP",1);
 +?></pre>
 +</code>
 +
  
uphp/functions/sys_set.txt · Last modified: 2024/07/16 03:41 by admin