PHP和JAVA的XML-RPC中文问题解决办法
问题描述: 欢欢 。 环境:PHP内置XML-RPC的API,Apache的XML-RPC的JAVA API PHP下的解决方法: $output_options = array( $output_options = array("output_type" => "php"); 原文说明如下: output_type: return data as either php native data types or xml encoded. ifphp is used, then the other values are ignored. default = xml verbosity: determine compactness of generated xml. options are no_white_space, newlines_only, and pretty. default = pretty escaping: determine how/whether to escape certain characters. 1 or more values are allowed. If multiple, they need to be specified as a sub-array. options are: cdata, non-ascii, non-print, and markup.default = non-ascii, non-print, markup version: version of xml vocabulary to use. currently, three are supported: xmlrpc, soap 1.1, and simple. The keyword auto is also recognized to mean respond in whichever version the request came in. default = auto (when applicable), xmlrpc encoding: the encoding that the data is in. Since PHP defaults to iso-8859-1 you will usually want to use that. Change it if you know what you are doing. default=iso-8859-1 经过测试关键是在"escaping" => array("markup")这个值上,将第三个参数传入如下值就可以解决问题了: $output_options = array( |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |