我是xml的新手,我只想将一个对象传递给url并将其解析为数组。不知道该怎么办
这是我的代码:
$xml = "<user><name>".$name."</name><balance>".$balance."</balance><address>".$address."</address><mobile>".$mobile."</mobile></user>";
$simple = new SimpleXMLElement($xml);
$simple2 = $simple->asXML();
$sample = simplexml_load_string($simple2);
$url = $GLOBALS['urlPath'].'webportal_sqlanywhere/xml.php?id='.$(my xml);
$path_file = file_get_contents($url);
echo $path_file;