-2
我需要這個代碼PHP轉換爲ColdFusion的: 有嗡嗡聲參數XML什麼是必要的支出參數是將PHP函數curl_init()來的ColdFusion
<?php
$_string = '<SPCA-XML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.scpc.inf.br/spcn/spcaxml.xsd">
<VERSAO>20131120</VERSAO>
<SOLICITACAO>
<S-CODIGO>2122</S-CODIGO>
<S-SENHA>5454</S-SENHA>
<S-CONSULTA>4545</S-CONSULTA>
<S-SOLICITANTE>XXXXXX</S-SOLICITANTE>
<S-CPF>2222222</S-CPF>
<S-TIPO-CREDITO>CD</S-TIPO-CREDITO>
</SOLICITACAO>
</SPCA-XML>';
$_post = curl_init();
curl_setopt($_post, CURLOPT_URL, "https://www.scpc.inf.br/cgi-bin/spcaxml");
curl_setopt($_post, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($_post, CURLOPT_POSTFIELDS, $_string);
curl_setopt($_post, CURLOPT_RETURNTRANSFER, 1);
$_result = curl_exec($_post);
curl_close($_post);
header("Content-type: text/xml");
echo $_result;
?>
你到目前爲止嘗試過什麼?您可能首先要查找''。 https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-g-h/cfhttp.html –