Serializes the document as an HTML file

# Dom\HTMLDocument::saveHtmlFile

(PHP 8 >= 8.4.0)

Dom\HTMLDocument::saveHtmlFile — Serializes the document as an HTML file

### 说明

public function Dom\HTMLDocument::saveHtmlFile(string `$filename`): int|false

Serializes the document as an HTML file.

### 参数

`filename`
  The path to the file to save to.

### 返回值

The number of bytes written on success, or `false` on failure.

### 错误／异常

- Throws a ValueError if `filename` is an empty string or contains any null bytes.

### 参见

- Dom\HTMLDocument::saveHtml() - Serializes the document as an HTML string
- Dom\HTMLDocument::saveXmlFile() - Serializes the document as an XML file

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open