Home > Backend Development > PHP Tutorial > Type issues in data exchange with codeigniter's xmlrpc class in PHP_PHP Tutorial

Type issues in data exchange with codeigniter's xmlrpc class in PHP_PHP Tutorial

WBOY
Release: 2016-07-21 15:27:36
Original
1001 people have browsed it

The request sent by the client is similar to this

Copy code The code is as follows:

$request = array('parameters00','parameters01 ');

In the client request, you can specify the data type of the parameters. You can put each parameter into an array separately and specify the data type of the parameter in the second position of the array. Something like this
Copy the code The code is as follows:

$request = array(
array('parameters00','string '),
array('parameters01','boolean'),
array('parameters02','struct'),
array('parameters03','int'),
);

The return response from the server has some rigid requirements. The array must be formatted, and there must be only one main array in the response array, similar to this:
Copy code The code is as follows:

$response = array(
array(parameters00 => array('para00','string'),
parameters01 => array('para01','struct'),
parameters02 => array('para02','boolean'),
),'struct');

If you want to use an associative array, you need to pay attention to the type specification of the associative array, similar to this:
Copy the code The code is as follows:

$request = array(
array(
'parameters00' => array(array('paraoo' => 'value'),'struct'),
'parameters01' => array('para01','string'),
),'struct'
);

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323713.htmlTechArticleThe request sent by the client is similar to this. Copy the code as follows: $request = array('parameters00','parameters01' ); In the client request, you can specify the data type of the parameter, you can...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template