nicholas@2510: ERROR".$key."Could not open file for writing");
nicholas@2510: }
nicholas@2510: fclose($fileHandle);
nicholas@2510: // TODO:
nicholas@2510: // Generate the XML Base file and save it
nicholas@2630: $doc_struct = new DOMDocument;
nicholas@2630: $doc_struct->preserveWhiteSpace = false;
nicholas@2630: $doc_struct->formatOutput = true;
nicholas@2630: $doc_struct->loadXML("");
nicholas@2626: // Add the root
nicholas@2628: if (file_exists($testURL)) {
nicholas@2630: $test_proto = new DOMDocument;
nicholas@2630: $test_proto->loadXML(file_get_contents($testURL, FILE_TEXT));
nicholas@2630: $test_proto = $doc_struct->importNode($test_proto, true);
nicholas@2630: $doc_struct->documentElement->appendChild($test_proto);
nicholas@2626: }
nicholas@2510: // Add start time
nicholas@2510: // Add IP Address information
nicholas@2510: // Save the file
nicholas@2630: $newdoc->saveXML($filename);
nicholas@2510: echo "OK".$key."";
nicholas@2510: ?>