Including external libraries in the Macro Engine

image_pdfimage_print

New libraries or scripts that should be globally available in the Jedox Macro Engine (ME), you have to add in a folder that is readable for the ME.

The entry open_basedir in the file macro_engine_config.xml defines the read- and writeable paths for the ME (see Macro Engine Configuration):

open_basedir = “../httpd/app/base;../httpd/app/lib;tmp”

For the following example the use the path ../httpd/app/lib:

In ../httpd/app/lib/ we create a new folder named “test”. Now we copy the script, which we want to be globally available, into that folder, for example the script test.php.

After running a macro with the statement

include "test/test.php"

the script test.php is globally available in the Macro Engine.

Macro example:
include "test/test.php";
function retval(){
return foo();
}

image_pdfimage_print
Was this post helpful?
NoYes (No Ratings Yet)
Loading...