xmlrpc_encode_request

(PHP 4 >= 4.1.0, PHP 5, PHP 7)

xmlrpc_encode_request為 PHP 的值生成 XML

說(shuō)明

xmlrpc_encode_request(string $method, mixed $params, array $output_options = ?): string
警告

此函數(shù)是實(shí)驗(yàn)性的。此函數(shù)的表象,包括名稱(chēng)及其相關(guān)文檔都可能在未來(lái)的 PHP 發(fā)布版本中未通知就被修改。使用本函數(shù)風(fēng)險(xiǎn)自擔(dān)。

參數(shù)

method

Name of the method to call.

params

Method parameters compatible with method signature.

output_options

Array specifying output options may contain (default values are emphasised):

  • output_type: php, xml

  • verbosity: no_white_space, newlines_only, pretty

  • escaping: cdata, non-ascii, non-print, markup (may be a string with one value or an array with multiple values)

  • version: simple, xmlrpc, soap 1.1, auto

  • encoding: iso-8859-1, other character set supported by iconv

返回值

Returns a string containing the XML representation of the request.

范例

示例 #1 XMLRPC client functions example

參見(jiàn)