新北中和「蝙蝠檢出臺灣麗沙病毒」 疾管署提醒4種動物風險高
2024-12-29 00:39
1.PHP调用Http短信接口(返回值为xml),码短在PHP中如何提取出来里面的值?
PHP调用Http短信接口(返回值为xml),在PHP中如何提取出来里面的值?
使用 simplexml_load_string函数就可以了,例子程序代码:
<?码短pytest html源码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-29 00:51
2024-12-29 00:25
2024-12-29 00:09
2024-12-28 23:48
2024-12-28 23:22
2024-12-28 23:03
2024-12-28 22:18
2024-12-28 22:09