Code: Select all
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->preserveWhiteSpace = true;
$dom->formatOutput = true;
$path = $_SERVER['DOCUMENT_ROOT'] . 'protocol/' . $filename;
Everything works fine. It saves the file, it displays the file just fine. However, if I open up the created html file in any editor I cannot edit it and re-save it. The only way I can make changes is to copy the Select All, copy and paste into a new document and save it.
What am I doing wrong/missing to allow me to edit the file?