Skip to content

Built-In ExeOutput PHP Functions

ExeOutput for PHP provides you with some built-in PHP functions that may be called from your PHP scripts.

All strings used and returned by some PHP functions use the UTF-8 format.

List of available PHP functions

exo_unpackvirtualfile

string exo_unpackvirtualfile ( string $sourcepath , string $optionaldestpath )

Unpacks a compiled file from the internal storage to the specified virtual folder. Note that the file is not unpacked to the hard disk, but in memory.

  • $sourcepath is the virtual source path to the compiled file you want to unpack to memory.
  • $optionaldestpath is the absolute path to the destination virtual file. If you leave it blank, the path from $_SERVER%%['%%DOCUMENT_ROOT'] + the virtual path is used.

The function returns the absolute path to the virtual file (in UTF-8 format). This path can be used with PHP functions such as fopen, file_exists, file_get_contents. See more about accessing compiled files

Info

Note: you can also use the option Unpack the file(s) to virtual memory at startup

exo_removevirtualfile

void exo_removevirtualfile(string $destpath);

Removes the specified file from the internal storage.

$destpath must contain the full path to the file.

exo_getglobalvariable

string exo_getglobalvariable (string $name, string $default);

Returns the value of the global variable whose name is name. If the global variable does not exist, the default value is returned. Similar to the GetGlobalVar HEScript function.

exo_setglobalvariable

string exo_setglobalvariable (string $name, string $value, bool $isstored);

Sets the Value of a global variable whose name is name. If isstored is true, the global variable is persistent: its value will be stored and restored the next time the application is run. Similar to the SetGlobalVar HEScript function.

exo_runhescriptcom

void exo_runhescriptcom(string $comline);

This function is the most used: it lets you execute an HEScript function or procedure. It is similar to the hescript: protocol, except that you specify the command line via comline.

Syntax for ComLine: [HEScript script name].[procedure/function name]|Param1|Param2|....|ParamN

Please see the How to call a script help topic.

exo_return_hescriptcom

string exo_return_hescriptcom(string $comline, string $defvalue)

This function is similar to the previous one except that it calls an HEScript string function and returns its result. It is similar to the hescript: protocol, except that you specify the command line via comline and a default value in defvalue if the function is not found.

Syntax for ComLine:

[HEScript script name].[procedure/function name]|Param1|Param2|....|ParamN.

Please see the How to call a script help topic. Example below.

exo_get_resstring

string exo_get_resstring(string $ID)

Returns the resource string whose name is given by ID.

Example

Call an HEScript string function and return its result:

<?php
echo exo_return_hescriptcom("UserMain.ReturnDate", "Error");
?>

Introduction to scripting

How to call HEScript procedures/functions?