What can we improve?

Documentation

(Edit)

Translation is in progress...
Not all topics are available at the moment and content links may be broken.

IPS_RunScriptTextEx

boolean IPS_RunScriptTextEx (string $ScriptText, array $Parameter)

Parameters

ScriptText String that is executed as script
Parameter Key (string) => Value (variant) Pairs that can be accessed in the executed script

Returns

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

Description

The command starts a script with the content ScriptText. It is not necessary to state PHP tags.

When using IPS_RunScriptTextEx, the script is executed in its own context. Thus, it does not have access to the variables of the calling script except for the passed parameters. Additional data can only be exchanged via external variables. The command is suited for situations, where a script needs to be executed soon but does not require the context of the calling script. The runtime of the scripts do not change as both scripts are executed simultaneously.

The array Parameter can contain any number of "Key => Value" pairs (see PHP Arrays). Every pair appears in the called script as variable Key with the value Value.

Example

// Prints "Hello World" in the message view
IPS_RunScriptTextEx('echo $_IPS["start"] . " ".  $_IPS["end"];', Array("start" => "Hello", "end" => "World"));
Deutsche Webseite verfügbar
Go to cart
Any questions?