• <legend id='td2qS'><style id='td2qS'><dir id='td2qS'><q id='td2qS'></q></dir></style></legend>
    1. <small id='td2qS'></small><noframes id='td2qS'>

      <tfoot id='td2qS'></tfoot>
        <bdo id='td2qS'></bdo><ul id='td2qS'></ul>

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

      1. PHP 中的 SoapClient 错误回退

        时间:2023-05-22
        <tfoot id='nxstu'></tfoot>
        • <small id='nxstu'></small><noframes id='nxstu'>

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

                  <bdo id='nxstu'></bdo><ul id='nxstu'></ul>
                  <legend id='nxstu'><style id='nxstu'><dir id='nxstu'><q id='nxstu'></q></dir></style></legend>
                    <tbody id='nxstu'></tbody>
                  本文介绍了PHP 中的 SoapClient 错误回退的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  在 PHP 中,如果您尝试实例化一个新的 SoapClient,并且 WSDL 不可访问(服务器停机或其他),抛出 PHP 致命错误:

                  In PHP, if you try to instantiate a new SoapClient, and the WSDL is not accessible (server down or whatever), a PHP fatal error is thrown:

                  致命错误:SOAP-ERROR:解析 WSDL:无法加载'http://example.com/servlet/app/SomeService?wsdl': 无法加载外部实体"http://example.com/servlet/app/SomeService?wsdl">

                  Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://example.com/servlet/app/SomeService?wsdl' : failed to load external entity "http://example.com/servlet/app/SomeService?wsdl"

                  PHP 中的致命错误,据我所知,无法恢复.

                  Fatal errors in PHP, as far as I know, are not recoverable.

                  有什么办法可以退缩吗?能否以某种方式避免这种致命错误?

                  Is there any way to fallback from this? Can this fatal error somehow be avoided?

                  我应该说我在 PHP 5.2 上运行,如果它有什么不同的话.

                  I should say that I am running on PHP 5.2, if it makes any difference.

                  推荐答案

                  这个已经讨论过了:

                  • https://bugs.php.net/bug.php?id=47584 莉>
                  • http://www.php.net/manual/en/class.soapclient.php#104046

                  Rasmus 本人提出了以下解决方案:

                  Rasmus himself proposed the following solution:

                  <?php  
                  try {  
                      $x = @new SoapClient("non-existent.wsdl",array("exceptions" => 1));  
                  } catch (SoapFault $E) {  
                      echo $E->faultstring; 
                  }  
                  echo "ok
                  ";
                  

                  这篇关于PHP 中的 SoapClient 错误回退的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PHP 的 SOAP 库 下一篇:将字节数组从 PHP 发送到 WCF

                  相关文章

                  最新文章

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

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

                    2. <legend id='dpmXw'><style id='dpmXw'><dir id='dpmXw'><q id='dpmXw'></q></dir></style></legend>
                        <bdo id='dpmXw'></bdo><ul id='dpmXw'></ul>