0
SuperGirl

PHP-MySQL help exporting to XML files

Recommended Posts

I need to extend someone's php project and I'm having trouble getting it to work in the first place. I'm not familiar with PHP at all, most of my programming skills are in Java/C++ so apologies if my explanations sound like nonsense, I don't really know what I'm talking about...

so here's the thing. I've got a database and the website has a feature for exporting someone's records to an xml file. First thing I tried was to test that what's already implemented works... but I get this error:

Fatal error: Class 'DOMDocument' not found in /var/www/localhost/htdocs/mypmr/export.php on line 44

well, looking at the code, it's creating this DOMDocument and adding the structure... and from what I understand this should work just fine since I'm running PHP5
So. What's going on here?
I can PM you code and other details you might need...

Share this post


Link to post
Share on other sites
I've done something similar to this.

I modified a script to display my most played xmms songs from a sqlite database, with the table being an xml export.

Here's a link: http://dontpanic.dyndns.org/xmms_stats_direct.php

Let me know if you would like to see the code for this script, but it was originally written in French, and many of the variable names show that heritage.

If this is a newly setup server, are you sure you have xml turned on in your php?

You can check this by adding a small section of debugging code to one of your web pages:
phpinfo();

?>

This will dump gobs of information about you php setup. There should be a section on xml, indicating that xml support is active.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0