Jump to content

PHP Dynamically Create XML document


SYEDHANIF

Recommended Posts

hiI am having PHP File I need Dyanamically Create XML document in PHP File i.e i have to write source code in php filecan any tell how to do this it is available please send a peace of code that i can understand the logic any have the answer pls let me know it is very urgentregards syedhanif

Link to comment
Share on other sites

i did something like this but I instead of outputting xml in a php file i outputted a php array to a new file. here's what I used, it may help you to create the function you need:

$f=fopen("db.php","w");     fwrite($f, str_replace("$", "$", "<?php ".$output."?>"));     fclose($f);

I doubt you'll need the st_rreplace in there but if you have any special characters that mess up the script like the $ it may be usefull. if the file does not exist, it wil attempt to create it, assuming you have your directory's permissions set so a new file can be created.hope this helps, i didnt go through those other links so if its the same im sorry... im just too lazy haha

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...