加沙地帶衞生部門:本輪巴以衝突已致加沙2.69萬人死亡
2024-12-23 01:30
1.PHP调用Http短信接口(返回值为xml),短短信在PHP中如何提取出来里面的值?
PHP调用Http短信接口(返回值为xml),在PHP中如何提取出来里面的值?
使用 simplexml_load_string函数就可以了,例子程序代码:
<?送源名人主图指标源码php
$string = <<<XML
<?xml version="1.0" encoding="utf-8" ?>
<returnsms>
<returnstatus>status</returnstatus>
<message>message</message>
</returnsms>
XML;
$xml = simplexml_load_string($string);
echo 'returnstatus:',$xml->returnstatus,"\n";
echo 'message:',$xml->message,"\n";
print_r($xml);
>2024-12-23 01:30
2024-12-23 01:10
2024-12-23 01:04
2024-12-23 00:41
2024-12-22 23:56
2024-12-22 23:16
2024-12-22 23:09
2024-12-22 23:02