PHP - Manual: Dom\HTMLDocument::saveHtml
2025-02-27
(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveHtml — Serializes the document as an HTML string
Serializes the document as an HTML string.
node
The serialized HTML document string in the current document encoding.
Dom\WRONG_DOCUMENT_ERR
if node
is from another document.
官方地址:https://www.php.net/manual/en/dom-htmldocument.savehtml.php