simplexml_load_file 函数用不的问题, 我的环境是 PHP Version 5.1.6+linux,可 simplexml_load_file 这个函数用不了,可能是php版本或是配制文件设置的问题,现想把 这个函数设为可用,应该怎么设置呀,thanks 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在你的php.ini里面查找扩展是否开启! 好像内置吧?待会儿去官方查一下用了simplexml_load_file 提示啥。这个应该需要allow_url_fopen = On 多谢大家1 在php.ini文件中 allow_url_fopen = On 是这样的2 我运行 $xml = simplexml_load_file('a.xml');print_r($xml);出现在结果是:SimpleXMLElement Object ( [SecondHouse] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 217045 [userid] => jtzy [password] => 123456 [del] => 0 ) [House] => 3-2-2 [AddDate] => 2010-11-2 16:35:08 ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 217042 [userid] => jtzy [password] => 123456 [del] => 0 ) [House] => 3-2-1 [AddDate] => 2010-11-2 16:30:56 ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 217041 [userid] => jtzy [password] => 123456 [del] => 0 ) [House] => 2-2-1 [AddDate] => 2010-11-2 16:19:06 ) ) ) 现我要取 [House] [AddDate] 二个的值,并把这二个值放入二维数组中,怎么取呀, $xml = simplexml_load_file('a.xml');foreach($xml->SecondHouse as $v){ echo $v->House.'<br/>'; echo $v->AddDate.'<br/>';}可以了 AppServ 2.6安装之后进入不了phpMyAdmin??? int 问题 div的问题 【新年快乐,散分庆祝】 php应该怎么处理用户提交的数据? 谁有 VS.PHP for 2005 v2.0.1.2556 我就不信,上这个论坛的没有人有这个东西了 !! 急招php与asp.net程序员多名,广州 奇怪的php乱码问题,和mysql无关,关于file()的 简单的传参问题,拜托! php实现上传的问题 simplexml_load_file取值放入数组的问题,在线等 mysql的update问题
1 在php.ini文件中 allow_url_fopen = On 是这样的
2 我运行
$xml = simplexml_load_file('a.xml');
print_r($xml);
出现在结果是:SimpleXMLElement Object ( [SecondHouse] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 217045 [userid] => jtzy [password] => 123456 [del] => 0 ) [House] => 3-2-2 [AddDate] => 2010-11-2 16:35:08 ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 217042 [userid] => jtzy [password] => 123456 [del] => 0 ) [House] => 3-2-1 [AddDate] => 2010-11-2 16:30:56 ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 217041 [userid] => jtzy [password] => 123456 [del] => 0 ) [House] => 2-2-1 [AddDate] => 2010-11-2 16:19:06 ) ) ) 现我要取 [House] [AddDate] 二个的值,并把这二个值放入二维数组中,怎么取呀,
foreach($xml->SecondHouse as $v)
{
echo $v->House.'<br/>';
echo $v->AddDate.'<br/>';
}
可以了