farban Posted May 19, 2009 Share Posted May 19, 2009 Hey i have a T_OBJECT_OPERATOR syntax error when opening mp3.php page. I know its because its php 4 and dosent understand the code but i want to fix this problem without upgrading to php 5. any help please? mp3.php page <?php $doc = new DOMDocument(); $doc->load( 'Playlist.xml' ); $musiclist = $doc->getElementsByTagName( "mp3" ); foreach( $musiclist as $song ) { $artists = $song->getElementsByTagName( "artist" ); $artist = $artists->item(0)->nodeValue; $titles= $song->getElementsByTagName( "title" ); $title= $titles->item(0)->nodeValue; $urls = $song->getElementsByTagName( "url" ); $url = $urls->item(0)->nodeValue; echo "<b>$artist - $title - $url\n</b><br>"; } ?> Quote Link to comment Share on other sites More sharing options...
papaface Posted May 19, 2009 Share Posted May 19, 2009 Ignore. Quote Link to comment Share on other sites More sharing options...
farban Posted May 19, 2009 Author Share Posted May 19, 2009 i dont get you lol Quote Link to comment Share on other sites More sharing options...
papaface Posted May 19, 2009 Share Posted May 19, 2009 Ignore that message I posted is what I mean. Quote Link to comment Share on other sites More sharing options...
farban Posted May 19, 2009 Author Share Posted May 19, 2009 can anyone help me please? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 19, 2009 Share Posted May 19, 2009 You'll have to re-write the code using PHP 4 - http://us3.php.net/domxml PHP 4 doesn't have the DOMDocument class. That's PHP 5. I suggest upgrading. PHP 4 is history man. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted May 19, 2009 Share Posted May 19, 2009 The end of life and end of support for php4 was one and a half years ago. There is no good reason to still be using php4. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.