一英國貨輪遭也門胡塞武裝襲擊後起火
2024-12-23 00:39
1.PHP调用Http短信接口(返回值为xml),短短信在PHP中如何提取出来里面的值?
PHP调用Http短信接口(返回值为xml),在PHP中如何提取出来里面的值?
使用 simplexml_load_string函数就可以了,例子程序代码:
<?送源mtcp源码解读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:37
2024-12-23 01:18
2024-12-23 00:48
2024-12-23 00:43
2024-12-23 00:38
2024-12-23 00:28
2024-12-22 23:52
2024-12-22 23:13