Executes I5 command without returned value.
bool i5_ remotecmd (string command [, resource connection])
Parameters
command |
Command to perform on IBM i. |
connection |
Connection ID(optional). |
Return
True if OK, false if failed.
I5_ERR_DESC_WRONG_DATAOP |
41 |
Wrong operation on a data field of a description |
I5_ERR_PARSEXML |
42 |
Internal error; please contact Aura Equipements. 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. |
Details
Command is sent to IBM i and performed according to connected profile. Its syntax is identical to a terminal entered command syntax but cannot be interactive ( DSPxxx type).
Use i5_cmd function for commands with returned values.
Example
/* Message sending */
$ret = i5_remotecmd("ADDLIBLE EASYCOMXMP") ;
if (!$ret && i5_error()['num'] !=312)
{
print_r("i5_remotecmd error : ".i5_errormsg().'<br/>');
}
else
{
echo 'i5_remotecmd done<br/>';
}
See also