Documentation
IPS_SetScriptContent
Require: Symcon >= 3.1
bool IPS_SetScriptContent (int $ScriptID, string $Content)
Parameters
| ScriptID | ID of the script |
| Content | Content, including PHP tags (<? and ?>) |
Returns
If the function succeeds, it returns TRUE, otherwise FALSE.
Description
This function sets the content of the script with the ID ScriptID. The function replaces the content of the script file.
This function should be used with care as the previous content is overwritten without a warning.
Example
$ScriptID = IPS_CreateScript(SCRIPTTYPE_PHP);
IPS_SetName($ScriptID, "My Script");
IPS_SetScriptContent($ScriptID, "<? echo 'Test!'; ?>");