Dom\HTMLDocument::createFromFile

Parses an HTML document from a file

&reftitle.description; public static `Dom\HTMLDocument` `Dom\HTMLDocument::createFromFile` `string` `path` `int` `options` 0 ``string``null```overrideEncoding`&null;

Parses an HTML document from a file, according to the living standard.

&reftitle.parameters;

`path`

- The path to the file to parse.

`options`

- &dom.parameter.compliant.options;

`overrideEncoding`

- &dom.parameter.compliant.encoding;
&reftitle.returnvalues;

The parsed document as an `Dom\HTMLDocument` instance.

&reftitle.errors;

- Throws a ValueError if `path` contains null bytes or contains `"%00"`.

&dom.errors.compliant.common;

- Throws an Exception if the file could not be opened.

&dom.parser.compliant.note.whitespace;
&reftitle.seealso;

- `Dom\HTMLDocument::createEmpty`
- `Dom\HTMLDocument::createFromString`