Modern DOM library written in PHP for HTML documents
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

967 B

title
Document::load

Document::load — Load HTML from a file

Description

public Document::load ( string $filename , null $options = null , string|null $encodingOrContentType = null ) : bool

Loads an HTML document from a file.

Parameters

filename
The path to the HTML document.
options
Always null. Was used for option constants in \DOMDocument.
encodingOrContentType
The encoding of the document that is being loaded. If not specified it will be determined automatically.

Return Values

Returns true on success or false on failure.

Examples

Example #1 Creating a Document

<?php

namespace MensBeam\HTML;

$dom = new Document();
$dom->load('ook.html');
echo $dom;

?>