Alex-Grim Posted December 18, 2007 Share Posted December 18, 2007 I'm not really used to working with php yet, or xml, so this is a new topic to me. I wrote a script that uses the php simpleXMLElement() class to update my rss feed when i write a new topic on my site. All it does, is load the rss file, and append a new item to it, and write it back to disk. It's works great, i love having this function! The problem is that when i uploaded it to my host (Godaddy.com), it stopped working, claiming that i am calling a non existant class. I called them and they claim that that means that i have a script error, but i know better: It means that they don't support it. So, that leads me to my question. What is the most COMMON method used to manipulate xml in php? I've been doing a little homework, and have seen the xmlReader and xmlWriter and DomXml classes, but they are a little advanced, and not readily understood. Hell, i don't even know if they're even capable of doing what i'm trying to do. I'd prefer something simple (if there is something more simple than simpleXML! I love this thing), because i'm still new, but whatever will work, will work for me. Btw, just in case I'M wrong, here's the error: Fatal error: Cannot instantiate non-existent class: simplexmlelement in /var/www/... Thanx Quote Link to comment Share on other sites More sharing options...
corbin Posted December 18, 2007 Share Posted December 18, 2007 From what I understand (which about SimpleXML is basically nothing), SimpleXML is PHP5 only.... What version of PHP does your host use? And, if it's not php5, sometimes hosts offer the ability to use multiple versions of PHP.... If you make a file called <something>.php5, does it parse? (It may not be done by default, but I've seen a few hosts where it is.) If you're using PHP5, it might just be disabled.... Quote Link to comment Share on other sites More sharing options...
Alex-Grim Posted December 18, 2007 Author Share Posted December 18, 2007 Hey, my host had me under php4, but i got them to switch me to 5. Btw, i like the trick for renaming the extention to php5, it worked. Thanx for your help, and i guess i'll mark this thread closed, since i don't need to find another way now 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.