|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
问题描述: 欢欢 。 环境: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(
找遍了Apache提供的API似乎也没有找到类似PHP那样的第三个参数,实在无奈发现他提供了一个Base64的类,我便只好将所有的中文字符在Client端用 Base64编码,然后request到Server上,然后在Server端在用Base64解码,哈哈~~~问题也能解决!不过不知道还有没别的更好的办法了? 谁有更好的解决方式请和我联系: 返回类别: 教程 上一教程: PHP + BAT 制作PHP自解析批处理 下一教程: 透析PHP的配置文件php.ini 您可以阅读与"PHP和JAVA的XML-RPC中文问题解决办法"相关的教程: · 抛开Cookie使用SESSION-PHP中SESSION不能跨页传递问题的解决办法 · 使用php动态生成gif时碰到的问题和解决办法 · 抛开Cookie使用SESSION-PHP中SESSION不能跨页传递问题的解决办法 · 使用php 5时MySQL返回乱码的解决办法 · 有关在Windows下配置PHP+Apache+Optimizer失败的问题解决方案 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |