Home > Backend Development > PHP Tutorial > php调用webservice接口,乱码及报错的有关问题

php调用webservice接口,乱码及报错的有关问题

WBOY
Release: 2016-06-13 12:36:57
Original
1162 people have browsed it

php调用webservice接口,乱码及报错的问题

$client = new SoapClient('http://www.webxml.com.cn/WebServices/TraditionalSimplifiedWebService.asmx?wsdl');
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
$obj = $client->toTraditionalChinese(array('sText'=>'个'));
print_r($obj);
?>
这个是我写的一个调用网上公开的简繁转换的webservice的代码,我已经指定了soap_defencoding为UTF-8,decode_utf8设置成false,但是执行了之后提示【Encoding: string '\xb8...' is not a valid utf-8 string 】

请大家帮忙看看这个该怎么处理

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template