laPistola Posted November 25, 2008 Share Posted November 25, 2008 <?php $xml = simplexml_load_file('http://www.inveroak.com/readerimages/livepanel/91130.xml'); ?> <html> <head> <title>Untitled Document</title> </head> <body> <?php foreach($xml->reader as $reader): ?> <div> <h2><?php echo($reader->name) ?></h2> <p>pin: <?php echo($reader->pin) ?></p> <p>status: <?php echo($reader->status) ?></p> </div> <?php endforeach; ?> </body> </html> im just getting Fatal error: Call to undefined function: simplexml_load_file() the PHP server is 4.4.8 i take it simpleXML isn't on this server version so what can i do instead? Link to comment https://forums.phpfreaks.com/topic/134200-solved-simple-xml-what-am-i-doing-wrong/ Share on other sites More sharing options...
laPistola Posted November 25, 2008 Author Share Posted November 25, 2008 ok after adding SetEnv DEFAULT_PHP_VERSION 5 to the .htaccess its now php5, but now im back to my original problem the data isn't showing, the XML file is http://www.inveroak.com/readerimages/livepanel/91130.xml Link to comment https://forums.phpfreaks.com/topic/134200-solved-simple-xml-what-am-i-doing-wrong/#findComment-698560 Share on other sites More sharing options...
laPistola Posted November 25, 2008 Author Share Posted November 25, 2008 never mind im an idiot and should of never posted, all i needed to do was make sure the letter case was the same .... big dope. Link to comment https://forums.phpfreaks.com/topic/134200-solved-simple-xml-what-am-i-doing-wrong/#findComment-698564 Share on other sites More sharing options...
br3nn4n Posted November 25, 2008 Share Posted November 25, 2008 You're not an idiot. An idiot is someone (....m...e....) who wastes 3 hours trying to get simpleXML to work only to end up with a measly 5 lines of code that works like a charm to do what he wasted the 3 hours on. Link to comment https://forums.phpfreaks.com/topic/134200-solved-simple-xml-what-am-i-doing-wrong/#findComment-698572 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.