View Single Post
Old 08-24-2009, 06:55 PM   #3 (permalink)
JaimePinheiro
The Wanderer
 
JaimePinheiro's Avatar
 
Join Date: Jul 2009
Posts: 5
Thanks: 0
JaimePinheiro is on a distinguished road
Default

Try to replace this before while loop:
$myFile = "data.xml";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "<?xml version=\"1.0\" encoding=\"ISO-8859-7\" ?>\n\n";

And this:
fclose($fh);
just after.

You are looping through each register of database, and for each one, you are openning the file, writing xml header, writing one register and closing the file, n times.
JaimePinheiro is offline  
Reply With Quote