dpw70180 2017-06-29 14:46
浏览 31
已采纳

too long

Though I have written ini_setdisplay errors at top of the page, the page is blank.

error_reporting(E_ALL);
ini_set('display_errors', 1);
$xml_data = '
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <WebLogin xmlns="http://www.example.com/2005/">
      <userLoginPlain>sdf</userLoginPlain>
      <passwordPlain>sdsf</passwordPlain>
      <keyOverride>sdfsdf</keyOverride>
    </WebLogin>
  </soap:Body>
</soap:Envelope>
';
$URL = "https:///exampleff.com/ForumXML.asmx";

$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);

print_r($output); 
  • 写回答

1条回答 默认 最新

  • dqvrlgi3247 2017-06-29 14:53
    关注

    It because you receive XML, press [F12] in Chrome to see.

    And will be better use SOAP-client for communicate with SOAP-server Look more http://php.net/manual/en/book.soap.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度