<?
header("Content-Type:text/xml");
echo "<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<g2sResponse xmlns="http://www.gamingstandards.com/wsdl/g2s/v1.0"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<g2s:g2sMessage xmlns:g2s="http://www.gamingstandards.com/g2s/schemas/v1.0.3">
<g2s:g2sAck g2s:dateTimeSent="'.time_xml().'" g2s:egmId="RBG_1234"
g2s:hostId="2"/>
</g2s:g2sMessage></g2sResponse>
</soap:Body>
</soap:Envelope>
>"
?>
注意要添加上 header("Content-Type:text/xml");指定输出数据为xml语法,ajax默认回传的编码方式是UTF-8,可以在encoding中指定回传数据的编码,也可以在页面中设置指定编码header('charset=gbk;Content-Type:text/xml;Pragma:no-cache;Cache-Control:no-cache;')
留言列表