<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.hash.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.hash-update-file.php',
    1 => 'hash_update_file',
    2 => 'Добавляет данные из файла в активный контекст хеширования',
  ),
  'up' => 
  array (
    0 => 'ref.hash.php',
    1 => 'Функции Hash',
  ),
  'prev' => 
  array (
    0 => 'function.hash-update.php',
    1 => 'hash_update',
  ),
  'next' => 
  array (
    0 => 'function.hash-update-stream.php',
    1 => 'hash_update_stream',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/hash/functions/hash-update-file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.hash-update-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">hash_update_file</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PHP 8, PECL hash &gt;= 1.1)</p><p class="refpurpose"><span class="refname">hash_update_file</span> &mdash; <span class="dc-title">Добавляет данные из файла в активный контекст хеширования</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.hash-update-file-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>hash_update_file</strong></span>(<span class="methodparam"><span class="type"><a href="class.hashcontext.php" class="type HashContext">HashContext</a></span> <code class="parameter">$context</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></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.resource.php" class="type resource">resource</a></span></span> <code class="parameter">$stream_context</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>


 </div>

 <div class="refsect1 parameters" id="refsect1-function.hash-update-file-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">context</code></dt>
     <dd>
      <p class="para">
       Контекст хеширования, который возвращает функция <span class="function"><a href="function.hash-init.php" class="function">hash_init()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       URL-адрес, который описывает расположение файла, который требуется захешировать; поддерживаются обёртки,
       с которыми работает функция <span class="function"><a href="function.fopen.php" class="function">fopen()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">stream_context</code></dt>
     <dd>
      <p class="para">
       Контекст потока, который возвращает функция <span class="function"><a href="function.stream-context-create.php" class="function">stream_context_create()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.hash-update-file-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция возвращает <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если выполнилась успешно, или <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если возникла ошибка.
  </p>
 </div>

 <div class="refsect1 changelog" id="refsect1-function.hash-update-file-changelog">
  <h3 class="title">Список изменений</h3>
 <p class="para">
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
       <td>8.0.0</td>
       <td>
        Параметр <code class="parameter">stream_context</code> теперь принимает значение null.
       </td>
      </tr>

     <tr>
      <td>7.2.0</td>
      <td>
       Функция принимает объект класса <span class="classname"><a href="class.hashcontext.php" class="classname">HashContext</a></span>, а не ресурс.
      </td>
     </tr>

    </tbody>
   
  </table>

 </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.hash-update-file-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.hash-init.php" class="function" rel="rdfs-seeAlso">hash_init()</a> - Инициализирует контекст инкрементного хеширования</span></li>
    <li><span class="function"><a href="function.hash-update.php" class="function" rel="rdfs-seeAlso">hash_update()</a> - Добавляет данные в активный контекст хеширования</span></li>
    <li><span class="function"><a href="function.hash-update-stream.php" class="function" rel="rdfs-seeAlso">hash_update_stream()</a> - Добавляет данные из открытого потока в активный контекст хеширования</span></li>
    <li><span class="function"><a href="function.hash-final.php" class="function" rel="rdfs-seeAlso">hash_final()</a> - Завершает инкрементальное хеширование и возвращает результат в виде хеш-кода</span></li>
    <li><span class="function"><a href="function.hash-file.php" class="function" rel="rdfs-seeAlso">hash_file()</a> - Генерирует хеш-значение на основе содержимого файла</span></li>
   </ul>
  </p>
 </div>


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