CodeIgniter tutorial PHP about the type of CodeIgniter XMLRPC class in data exchange

Source: Internet
Author: User
Tags codeigniter
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.