The client sends a request similar to this
Copy the Code code as follows:
$request = Array (' Parameters00 ', ' parameters01 ');
In the client's request you can set the data type of the parameter, you can put each parameter separately into an array, set the data type of the parameter in the second position of the array, like this
Copy the Code code as follows:
$request = Array (
Array (' Parameters00 ', ' string '),
Array (' Parameters01 ', ' Boolean '),
Array (' parameters02 ', ' struct '),
Array (' Parameters03 ', ' int '),
);
The return response of the server has a bit of a hard requirement, the array must be formatted, and there must be only one primary array in the response array, similar to this:
Copy the Code code as follows:
$response = Array (
Array (parameters00 = = Array (' para00 ', ' string '),
Parameters01 = = Array (' para01 ', ' struct '),
PARAMETERS02 = = Array (' Para02 ', ' Boolean '),
), ' struct ');
If you want to use associative arrays, be aware of the type-setting problems of associative arrays, like this:
Copy the Code code as follows:
$request = Array (
Array
' parameters00 ' = = Array (' paraoo ' = ' = ' value '), ' struct '),
' parameters01 ' = = Array (' Para01 ', ' string '),
), ' struct '
);
The above describes the CodeIgniter tutorial PHP on the CodeIgniter of the Xmlrpc class in the data exchange of the type, including the CodeIgniter tutorial aspects, I hope to be interested in PHP tutorial friends helpful.