Dom\HTMLDocument::saveHtml
(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveHtml — Serializes the document as an HTML string
说明
Serializes the document as an HTML string.
参数
node
- The node to serialize. If not provided, the entire document is serialized.
返回值
The serialized HTML document string in the current document encoding.
错误/异常
-
Throws a Dom\DOMException with code
Dom\WRONG_DOCUMENT_ERR
ifnode
is from another document.
参见
- Dom\HTMLDocument::saveHtmlFile() - Serializes the document as an HTML file
- Dom\HTMLDocument::saveXml() - Serializes the document as an XML string
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/dom-htmldocument.savehtml.php