What can we improve?

Documentation

(Edit)

IPS_GetScriptIDByFile

 int IPS_GetScriptIDByFile (string $FilePath) 

Parameters

FilePath

Relative path to the file from the script folder

Returns

ID of the found script, otherwise FALSE

Description

This function tries to determine the ID of the script whose script file matches FilePath. If a script with that file exists, its ID is returned, otherwise FALSE.

This function generates a warning if the name was not found. Use the @ operator, if you want to suppress this message. The exact function of this operator is described in the PHP manual.

Example

$ScriptID = @IPS_GetScriptIDByFile("12345.ips.php");
if ($ScriptID === false)
    echo "Script file not found!";
else
    echo "The ID of the script is: ". $ScriptID;