PHP_ExecuteToContainer


PHP_ExecuteToContainer ( phpCode {; fileName {; keepMemory {; timeoutSeconds }}} )


 

Description


Allows you to execute PHP code and return the result to a container field.

Note that you can now use fm_set_result to return a container value using PHP_Execute.


Parameters


phpCode (required)
The PHP code to execute.

fileName (optional)
The name of the file to be used for the container.

keepMemory (optional)

Used to indicate that values of the PHP code execution in memory should be kept from the previous execution.

timeoutSeconds (optional)
The number of seconds to wait for execution to complete.

 

Return


Returns the result of the PHP code as container data.

 

Errors


201 Timeout
202 PHP error
314 Container file name not set

 

Example 1 - Download FileMaker logo
PHP_Execute_To_Container ( "echo file_get_contents('http://www.filemaker.com/site/images/logo_filemaker.png');" ; "logo_filemaker.png" )
/*
Returns: FileMaker logo to container field
*/