« Back to Product

Documentation

IPS_SetScriptFile

 boolean IPS_SetScriptFile (int $ScriptID, string $FileName) 

Parameters

ScriptID

ID of the script

FileName

File name of the PHP file (relative to the "/scripts" folder)

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

This function binds the file with the name FileName to the script with the ID ScriptID. Usually, the file name of a script consists of the ID and the extension ".ips.php". The use of this function enables different file names.

The file name is not connected to the script name, which is shown in the object tree. The script and file name can be completely different. The ID of the script is also unaffected by this function. Neither the name nor the script file name can be used to directly identify the script. The numerical ID of the script is used for direct identification.

Example

$ScriptPath = "Example.ips.php"; //script file
$ScriptID = IPS_CreateScript(0);
// Bind
IPS_SetScriptFile($ScriptID, $ScriptPath);
Any questions?