<i id='MAznZ'><tr id='MAznZ'><dt id='MAznZ'><q id='MAznZ'><span id='MAznZ'><b id='MAznZ'><form id='MAznZ'><ins id='MAznZ'></ins><ul id='MAznZ'></ul><sub id='MAznZ'></sub></form><legend id='MAznZ'></legend><bdo id='MAznZ'><pre id='MAznZ'><center id='MAznZ'></center></pre></bdo></b><th id='MAznZ'></th></span></q></dt></tr></i><div id='MAznZ'><tfoot id='MAznZ'></tfoot><dl id='MAznZ'><fieldset id='MAznZ'></fieldset></dl></div>
  • <tfoot id='MAznZ'></tfoot>

    <small id='MAznZ'></small><noframes id='MAznZ'>

      <bdo id='MAznZ'></bdo><ul id='MAznZ'></ul>

        <legend id='MAznZ'><style id='MAznZ'><dir id='MAznZ'><q id='MAznZ'></q></dir></style></legend>

        克服 PHP、SoapServer、UTF-8 和非英文字符的编码问题

        时间:2023-05-22

          <small id='kEhhY'></small><noframes id='kEhhY'>

        1. <tfoot id='kEhhY'></tfoot>
            <tbody id='kEhhY'></tbody>
          <legend id='kEhhY'><style id='kEhhY'><dir id='kEhhY'><q id='kEhhY'></q></dir></style></legend>

          1. <i id='kEhhY'><tr id='kEhhY'><dt id='kEhhY'><q id='kEhhY'><span id='kEhhY'><b id='kEhhY'><form id='kEhhY'><ins id='kEhhY'></ins><ul id='kEhhY'></ul><sub id='kEhhY'></sub></form><legend id='kEhhY'></legend><bdo id='kEhhY'><pre id='kEhhY'><center id='kEhhY'></center></pre></bdo></b><th id='kEhhY'></th></span></q></dt></tr></i><div id='kEhhY'><tfoot id='kEhhY'></tfoot><dl id='kEhhY'><fieldset id='kEhhY'></fieldset></dl></div>
              <bdo id='kEhhY'></bdo><ul id='kEhhY'></ul>
                  本文介绍了克服 PHP、SoapServer、UTF-8 和非英文字符的编码问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我在让 PHP 与 SoapServer + UTF-8 配合使用时遇到问题.任何时候任何人发送带有非英语字符(即有趣的引号、重音字符等)的 Soap 请求时,SoapServer 都会抛出一个异常,说错误的请求".我试过用 utf8_decode 解码请求,甚至 HTML 特殊字符对文本进行编码.没有什么对我有用.

                  I'm having problems getting PHP to play nicely with SoapServer + UTF-8. Anytime anyone sends a Soap Request with non english characters (i.e. funny quotes, accented characters, etc) the SoapServer throws an exception saying "Bad Request." I've tried decoding the request with utf8_decode and even HTML Special Characters encoded the text. Nothing is working for me.

                  我正在寻找正确方向的点,因为我现在迷路了.

                  I'm looking for a point in the right direction because I'm lost at the moment.

                  推荐答案

                  确保 SoapServer 和 SoapClient 使用 UTF- 初始化8 编码:

                  make sure both SoapServer and SoapClient are initialized with UTF-8 encoding:

                  $client = new SoapClient("some.wsdl", array('encoding'=>'UTF-8'));
                  $server = new SoapServer("some.wsdl", array('encoding'=>'UTF-8'));
                  

                  使用有趣的引号、重音字符等"处理请求的 XML.验证?

                  does the XML of the requests with the "funny quotes, accented characters, etc." validate?

                  这篇关于克服 PHP、SoapServer、UTF-8 和非英文字符的编码问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:我如何通过 PHP 读取 SOAP 回复信封 下一篇:PHP - 在 PHP 中将 XML 转换为数组 - 在 php 中解析一

                  相关文章

                  最新文章

                • <small id='RA1IZ'></small><noframes id='RA1IZ'>

                    1. <legend id='RA1IZ'><style id='RA1IZ'><dir id='RA1IZ'><q id='RA1IZ'></q></dir></style></legend>

                        <bdo id='RA1IZ'></bdo><ul id='RA1IZ'></ul>
                      <tfoot id='RA1IZ'></tfoot>
                      <i id='RA1IZ'><tr id='RA1IZ'><dt id='RA1IZ'><q id='RA1IZ'><span id='RA1IZ'><b id='RA1IZ'><form id='RA1IZ'><ins id='RA1IZ'></ins><ul id='RA1IZ'></ul><sub id='RA1IZ'></sub></form><legend id='RA1IZ'></legend><bdo id='RA1IZ'><pre id='RA1IZ'><center id='RA1IZ'></center></pre></bdo></b><th id='RA1IZ'></th></span></q></dt></tr></i><div id='RA1IZ'><tfoot id='RA1IZ'></tfoot><dl id='RA1IZ'><fieldset id='RA1IZ'></fieldset></dl></div>