hvorfor vil den ikke lave filen
<?php$file_pointer = "Loghjem_export.xml";
if(file_exists($file_pointer)){
unlink($file_pointer);
}
$xml = new DomDocument("1.0","UTF-8",);
$xml->formatOutput = True;
$main = $xml->createElement('<ns6:Elements xsi:type="ns6:SymbolData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">');
$main = $xml->appendChild($main);
$string_value = $xml->saveXML();
$xml->save("Loghjem_export.xml");
$file = 'Loghjem_export.xml';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
readfile($file);
exit;
}
?>