Re: [請益] PHP用DOM來讀取XML的attributes讀不到ꨠ…
$xml = simplexml_load_file('xml.xml');
$user =& $xml->xpath("common/user");
$tmp_user = & $user[0]->attributes();
$user_id = (string)$tmp_user["user-id"];
echo $user_id;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 112.104.135.156
推
12/21 19:10, , 1F
12/21 19:10, 1F
推
12/22 00:15, , 2F
12/22 00:15, 2F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章
6
14