<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.recode.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.recode-file.php',
    1 => 'recode_file',
    2 => 'Перекодирует из одного файла в другой в соответствии с заданными параметрами',
  ),
  'up' => 
  array (
    0 => 'ref.recode.php',
    1 => 'Функции Recode',
  ),
  'prev' => 
  array (
    0 => 'function.recode.php',
    1 => 'recode',
  ),
  'next' => 
  array (
    0 => 'function.recode-string.php',
    1 => 'recode_string',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/recode/functions/recode-file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.recode-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">recode_file</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7 &lt; 7.4.0)</p><p class="refpurpose"><span class="refname">recode_file</span> &mdash; <span class="dc-title">Перекодирует из одного файла в другой в соответствии с заданными параметрами</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.recode-file-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>recode_file</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$request</code></span>, <span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$input</code></span>, <span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$output</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Перекодирует файл, заданный дескриптором
   <code class="parameter">input</code> в файл, заданный дескриптором
   <code class="parameter">output</code> в соответствии с
   <code class="parameter">request</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.recode-file-parameters">
  <h3 class="title">Список параметров</h3>
  <dl>
   
    <dt><code class="parameter">request</code></dt>
    <dd>
     <span class="simpara">
      Выбранный тип запроса на перекодировку
     </span>
    </dd>
   
   
    <dt><code class="parameter">input</code></dt>
    <dd>
     <span class="simpara">
      Локальный файловый ресурс (<span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>) <code class="parameter">input</code>
     </span>
    </dd>
   
   
    <dt><code class="parameter">output</code></dt>
    <dd>
     <span class="simpara">
      Локальный файловый ресурс (<span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>) <code class="parameter">output</code>
     </span>
    </dd>
   
  </dl>
 </div>


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


 <div class="refsect1 examples" id="refsect1-function.recode-file-examples">
  <h3 class="title">Примеры</h3>
  <div class="example" id="example-1">
   <p><strong>Пример #1 Пример использования <span class="function"><strong>recode_file()</strong></span></strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$input </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'input.txt'</span><span style="color: #007700">, </span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$output </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'output.txt'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">recode_file</span><span style="color: #007700">(</span><span style="color: #DD0000">"us..flat"</span><span style="color: #007700">, </span><span style="color: #0000BB">$input</span><span style="color: #007700">, </span><span style="color: #0000BB">$output</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.recode-file-notes">
  <h3 class="title">Примечания</h3>
  <p class="simpara">На данный момент эта функция не работает с дескрипторами,
   ссылающимися на удалённые файлы (URL). Оба файловых дескриптора должны указывать на
   локальные файлы.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.recode-file-seealso">
  <h3 class="title">Смотрите также</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.fopen.php" class="function" rel="rdfs-seeAlso">fopen()</a> - Открывает файл или URL-адрес</span></li>
  </ul>
 </div>


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