The Dom\HTMLDocument class
(PHP 8 >= 8.4.0)
简介
Represents an HTML document.
类摘要
/* 继承的常量 */
/* 继承的属性 */
/* 方法 */
public static function createFromFile(string
$path, int $options = 0, ?string $overrideEncoding = null): Dom\HTMLDocumentpublic static function createFromString(string
$source, int $options = 0, ?string $overrideEncoding = null): Dom\HTMLDocument/* 继承的方法 */
/* Not documented yet */
}注释
注意:
此 DOM 扩展在处理方法或属性时使用 UTF-8 编码。 解析器方法会自动检测编码,或允许调用者指定编码。
目录
- Dom\HTMLDocument::createEmpty — Creates an empty HTML document
- Dom\HTMLDocument::createFromFile — Parses an HTML document from a file
- Dom\HTMLDocument::createFromString — Parses an HTML document from a string
- Dom\HTMLDocument::saveHtml — Serializes the document as an HTML string
- Dom\HTMLDocument::saveHtmlFile — Serializes the document as an HTML file
- Dom\HTMLDocument::saveXml — Serializes the document as an XML string
- Dom\HTMLDocument::saveXmlFile — Serializes the document as an XML file
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
