ExeOutput for PHP provides several built-in PHP functions that can be called from your PHP scripts.
All strings used and returned by these PHP functions are in UTF-8 format.
Available PHP Functions #
exo_unpackvirtualfile #
string exo_unpackvirtualfile ( string $sourcepath , string $optionaldestpath )
Unpacks a compiled file from internal storage to a specified virtual folder. Note that the file is unpacked into memory, not to the hard disk.
$sourcepathis the virtual source path to the compiled file you want to unpack to memory.$optionaldestpathis the absolute path to the destination virtual file. If left blank, the path is constructed from$_SERVER['DOCUMENT_ROOT']and the virtual path.
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, and file_get_contents. See more about accessing compiled files.
Info
As an alternative, you can also use the “Unpack the file(s) to virtual memory at startup” option.
exo_removevirtualfile #
void exo_removevirtualfile(string $destpath);
Removes the specified file from internal storage.
$destpathmust contain the full path to the file.
exo_getglobalvariable #
string exo_getglobalvariable (string $name, string $default);
Returns the value of the global variable specified by $name. If the global variable does not exist, the $default value is returned. This is similar to the GetGlobalVar HEScript function.
exo_setglobalvariable #
void exo_setglobalvariable (string $name, string $value, bool $isstored);
Sets the value of a global variable specified by $name. If $isstored is true, the global variable is made persistent, meaning its value will be stored and restored the next time the application runs. This is similar to the SetGlobalVar HEScript function.
exo_runhescriptcom #
void exo_runhescriptcom(string $comline);
This is a commonly used function that lets you execute an HEScript function or procedure. It is similar to the hescript: protocol, except that you specify the command line via the $comline parameter.
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 it calls an HEScript function that returns a string, and it returns that function’s result. It is similar to the hescript: protocol, except that you specify the command line via $comline and a default value in $defvalue to be used 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 for an example.
exo_get_resstring #
string exo_get_resstring(string $ID)
Returns the resource string specified by $ID.
Example #
Calling an HEScript function and returning its result:
<?php
echo exo_return_hescriptcom("UserMain.ReturnDate", "Error");
?>