DOMDocument->saveHTMLFile()
    (no version information, might be only in CVS)
DOMDocument->saveHTMLFile() -- 
   内部のドキュメントを HTML 形式でファイルに出力する
  
説明
class 
DOMDocument { 
int 
saveHTMLFile ( string filename )
}
   DOM 表現から HTML ドキュメントを作成します。この関数は、通常は以下の例のように
   DOM ドキュメントを新しく作成した後にコールされます。
  
パラメータ
   
- filename
 
       保存された HTML ドキュメントへのパス。
      
 
  返り値
   書き込んだバイト数、あるいはエラーが発生した場合は FALSE を返します。
  
例
   
例 1. HTML ツリーをファイルに保存する 
<?php
  $doc = new DOMDocument('1.0'); // 出力はきれいに整形したいですね。 $doc->formatOutput = true;
  $root = $doc->createElement('html'); $root = $doc->appendChild($root);
  $head = $doc->createElement('head'); $head = $root->appendChild($head);
  $title = $doc->createElement('title'); $title = $head->appendChild($title);
  $text = $doc->createTextNode('This is the title'); $text = $title->appendChild($text);
  echo 'Wrote: ' . $doc->saveHTMLFile("/tmp/test.html") . ' bytes'; // Wrote: 129 bytes
  ?>
 |  
  |