XML creating using php

php , xml , mysql , dom India
  • 11 years ago
    HI frnds ! I am working with xml creating using php and mysql. depending upon the below code i created my xml file using php and mysql add_root('members'); $member = $root->new_child('member',''); $member->new_child('lastName','John'); $member->new_child('firstName','Adams'); $member->new_child('contribution','3400'); $member = $root->new_child('member',''); $member->set_attribute('videoclip', "New videoclip"); $member->new_child('lastName','Debra'); $member->new_child('firstName','Hones'); $member->new_child('contribution','2400'); $member = $root->new_child('member',''); $member->new_child('lastName','Jake'); $member->new_child('firstName','Tudor'); $member->new_child('contribution','1200'); $fp = @fopen('members.xml','w'); if(!$fp) { die('Error cannot create XML file'); } fwrite($fp,$doc->dumpmem()); fclose($fp); ?> But when i run that page in server at the time of **$doc = new_xmldoc('1.0');** It is redirecting to the unanimous URL it is....res://C:\WINDOWS\system32\shdoclc.dll/http_500.htm#http://My original url***************** It is working fine in my local machine..I tried to create xml with domxml , there also at the line **$doc = domxml_new_doc('1.0');** it is redirecting to the above unanimous url... I am in desperate trouble now..please somebody help me.. Thanks in advance, Anand kumar.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook