Frees program resource handle.
|
void i5_program_close |
( resource program ) |
|
program |
Program resource opened by i5_program_open |
Returns:
True if OK, false if failed.
|
I5_ERR_PARSEXML |
42 |
Internal error; please contact Aura Equipement; error number 42 |
|
I5_ERR_PHP_OPTIONSTYPE |
259 |
The type of " I5_OPTIONS_ALIAS" option must be x and not x |
|
I5_ERR_PHP_OPTIONSNUMBER |
260 |
Option number -1 is unknown. |
|
I5_ERR_PHP_TYPEPARAM |
262 |
Type of element x in parameter -1 must be y. Type z was provided. |
$description = array (
array ("Name"=>"OP1", "IO"=>I5_IN, "Type"=>I5_TYPE_PACKED, "Length"=>"5.2"),
array ("Name"=>"STR1", "IO"=>I5_IN, "Type"=>I5_TYPE_CHAR, "Length"=>20),
array ("Name"=>"OP2", "IO"=>I5_INOUT, "Type"=>I5_TYPE_PACKED, "Length"=>"5.2"),
array ("Name"=>"STR2", "IO"=>I5_INOUT, "Type"=>I5_TYPE_CHAR, "Length"=>30),
array ("Name"=>"OP3", "IO"=>I5_OUT, "Type"=>I5_TYPE_PACKED, "Length"=>"10.4")
);
$hdlPgm = i5_program_prepare("EASYCOM/RPCSAMPLE", $description);
$parameterIn = Array(10.1, "Hello", 20.2, "test");
$parameterOut = array("OP2"=>"parmOperator2", "STR2"=> "parmString2");
$ret = i5_program_call($hdlPgm, $parameterIn, $parameterOut);
if (!$ret){
print_r(i5_error());
trigger_error("i5_execute error : ".i5_errormsg(), E_USER_ERROR);
}
echo "Parameter 3(P1+ P3, 10.1 + 20.2) : $parmOperator2<BR>";
echo "Parameter 4(P2), Hello : $parmString2<BR>";
$ret = i5_program_close ($hdlPgm);
if (!$ret){
trigger_error("i5_program_close error : ".i5_errormsg(), E_USER_ERROR);
}