xml_parse只能处理utf-8编码的数据
显然你的$xml不是utf-8编码的,因为有“Hello World 恭喜.Input”

解决方案 »

  1.   

    我打印出$xml的数据.在utf8下显示是正常的.我的webservice是用.net编写的.而且我发现我只要把nusoap.php中的
    $this->parser = xml_parser_create($this->xml_encoding);
    这个时候$this->xml_encoding的值为:UTF-8改成:
    $this->parser = xml_parser_create('ISO-8859-1');
    后面的代码不用更改.
    就完全没有问题了,中文也不会出现乱码.
      

  2.   

    我在得到http头部信息的时候得到:
    $headers:Array ( [server] => Microsoft-IIS/5.0 [date] => Wed, 24 Aug 2005 03:42:05 GMT [x-powered-by] => ASP.NET [x-aspnet-version] => 1.1.4322 [cache-control] => private, max-age=0 [content-type] => text/xml; charset=utf-8 [content-length] => 376 ) ======================================
    $this->xml_encoding 的值就是 从头部中取出来的.有办法改变.net头部信息的charset值吗?
      

  3.   

    类似这样的:
    Response.Content-type = "text/html;charset=UTF-8";
      

  4.   

    我已知道解决该问题的办法.谢谢大家帮忙.结贴.详细解决方法可以到以下地址查看.
    PHP调用.net的webservice 中文乱码解决方案
    http://coolstr.cnblogs.com/archive/2005/08/25/222440.html