« Back to Product

Documentation

IPS_SetScriptContent

Require: IP-Symcon >= 3.1

 boolean IPS_SetScriptContent (int $ScriptID, string $Content) 

Parameters

ScriptID

ID of the script

Content

Content, including PHP tags (<? and ?>)

Returns

If the command 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.

Warning

This function should be handled with care as the previous content is overwritten without a warning

Example

$ScriptID = IPS_CreateScript(0);
IPS_SetName($ScriptID, "My Script");
IPS_SetScriptContent($ScriptID, "<? echo 'Test!'; ?>");
Any questions?