<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.dom-htmldocument.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'dom-htmldocument.createfromfile.php',
    1 => 'Dom\\HTMLDocument::createFromFile',
    2 => 'Parses an HTML document from a file',
  ),
  'up' => 
  array (
    0 => 'class.dom-htmldocument.php',
    1 => 'Dom\\HTMLDocument',
  ),
  'prev' => 
  array (
    0 => 'dom-htmldocument.createempty.php',
    1 => 'Dom\\HTMLDocument::createEmpty',
  ),
  'next' => 
  array (
    0 => 'dom-htmldocument.createfromstring.php',
    1 => 'Dom\\HTMLDocument::createFromString',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/dom/dom/htmldocument/createfromfile.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="dom-htmldocument.createfromfile" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Dom\HTMLDocument::createFromFile</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">Dom\HTMLDocument::createFromFile</span> &mdash; <span class="dc-title">Parses an <abbr title="Hyper Text Markup Language">HTML</abbr> document from a file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-dom-htmldocument.createfromfile-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>Dom\HTMLDocument::createFromFile</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$path</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$overrideEncoding</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="class.dom-htmldocument.php" class="type Dom\HTMLDocument">Dom\HTMLDocument</a></span></div>

  <p class="simpara">
   Parses an <abbr title="Hyper Text Markup Language">HTML</abbr> document from a file,
   according to the living standard.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-dom-htmldocument.createfromfile-parameters">
  <h3 class="title">Параметри</h3>
  <dl>
   
    <dt><code class="parameter">path</code></dt>
    <dd>
     <span class="simpara">
      The path to the file to parse.
     </span>
    </dd>
   
   
    <dt><code class="parameter">options</code></dt>
    <dd>
     <p class="para">
  <a href="language.operators.bitwise.php" class="link">Побітове
  <code class="literal">АБО</code></a> <a href="libxml.constants.php" class="link">констант опцій
  libxml</a>.
</p>
 <span class="simpara">
  It is also possible to pass <strong><code><a href="dom.constants.php#constant.dom-html-no-default-ns">Dom\HTML_NO_DEFAULT_NS</a></code></strong>
  to disable the use of the HTML namespace and the template element.
  This should only be used if the implications are properly understood.
</span>
    </dd>
   
   
    <dt><code class="parameter">overrideEncoding</code></dt>
    <dd>
     <span class="simpara">
 The encoding that the document was created in.
 If not provided, it will attempt to determine the encoding that is most likely used.
</span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-dom-htmldocument.createfromfile-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="simpara">
   The parsed document as an <span class="classname"><a href="class.dom-htmldocument.php" class="classname">Dom\HTMLDocument</a></span> instance.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-dom-htmldocument.createfromfile-errors">
  <h3 class="title">Помилки/виключення</h3>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     Throws a <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> if
     <code class="parameter">path</code> contains null bytes or contains
     <code class="literal">&quot;%00&quot;</code>.
    </span>
   </li>
   <li class="listitem">
 <span class="simpara">
  Throws a <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> if
  <code class="parameter">options</code> contains an invalid option.
 </span>
</li>
<li class="listitem">
 <span class="simpara">
  Throws a <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> if
  <code class="parameter">overrideEncoding</code> is an unknown encoding.
 </span>
</li>
   <li class="listitem">
    <span class="simpara">
     Throws an <span class="exceptionname"><a href="class.exception.php" class="exceptionname">Exception</a></span> if
     the file could not be opened.
    </span>
   </li>
  </ul>
 </div>


 <div class="refsect1 notes" id="refsect1-dom-htmldocument.createfromfile-notes">
 <h3 class="title">Примітки</h3>
 <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
  <span class="simpara">
   Whitespace in the <code class="literal">html</code> and <code class="literal">head</code> tags
   is not considered significant and may lose formatting.
  </span>
 </p></blockquote>
</div>


 <div class="refsect1 seealso" id="refsect1-dom-htmldocument.createfromfile-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="dom-htmldocument.createempty.php" class="methodname" rel="rdfs-seeAlso">Dom\HTMLDocument::createEmpty()</a> - Creates an empty HTML document</span></li>
   <li><span class="methodname"><a href="dom-htmldocument.createfromstring.php" class="methodname" rel="rdfs-seeAlso">Dom\HTMLDocument::createFromString()</a> - Parses an HTML document from a string</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>