$client->soap_defencoding = 'utf-8';
$client->xml_encoding = 'utf-8';
使用的是php自带的soap,webservice是.net写的,加了上面的语句也还是乱码,怎么办?
$client->xml_encoding = 'utf-8';
使用的是php自带的soap,webservice是.net写的,加了上面的语句也还是乱码,怎么办?
调试欢乐多
你这个php文件是utf-8编码的么?
能解决还可以加分
* @desc:测试soap
* @param:array $arr
* @return:string
*/
public function testSoap($arr){
$s=mb_convert_encoding($arr[0].$arr[1], "GBK", "UTF-8");
$str = "测试SOAP服务:".$s;
return mb_convert_encoding($str, "UTF-8", "GBK");
}client端
/**
* @desc:测试soap
*/
public function testSoap(){
//测试中文
echo $this->soap->testSoap(array("测试中文","rrrrrrrrrrrr咪呈进可以"));
}