0
XML 문서를 만들지 여부를 테스트하려고하지만 작동하지 않습니다. 신텍스에 문제가 있습니까? 정확히 만이 많은 코드를 얻는 곳에서 나도 몰라DOM을 사용하여 XML 파일을 만드는 동안 출력이 없습니다
function createFile()
{
// create new dom document
$xml = new DOMDocument();
// these lines would create a nicely indented XML file
$xml->preserveWhiteSpace = false;
$xml->formatOutput = true;
// create a root element
$root = $xml->createElement("phonebook");
// add root to DOM document root
$xml->appendChild($root);
// save dom document to an xml file
$xml->save('out.xml');
}