<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.filesystem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.is-readable.php',
    1 => 'is_readable',
    2 => 'Tells whether a file exists and is readable',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Функції Файлової Системи',
  ),
  'prev' => 
  array (
    0 => 'function.is-link.php',
    1 => 'is_link',
  ),
  'next' => 
  array (
    0 => 'function.is-uploaded-file.php',
    1 => 'is_uploaded_file',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/filesystem/functions/is-readable.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.is-readable" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">is_readable</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">is_readable</span> &mdash; <span class="dc-title">Tells whether a file exists and is readable</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.is-readable-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>is_readable</strong></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="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Tells whether a file exists and is readable.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.is-readable-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       Path to the file.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.is-readable-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the file or directory specified by
   <code class="parameter">filename</code> exists and is readable, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.is-readable-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para">
Під час збоїв буде видаватись <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>.
</p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.is-readable-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>is_readable()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$filename </span><span style="color: #007700">= </span><span style="color: #DD0000">'test.txt'</span><span style="color: #007700">;<br />if (</span><span style="color: #0000BB">is_readable</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">)) {<br />    echo </span><span style="color: #DD0000">'The file is readable'</span><span style="color: #007700">;<br />} else {<br />    echo </span><span style="color: #DD0000">'The file is not readable'</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.is-readable-notes">
  <h3 class="title">Примітки</h3>
  <p class="para">
   Keep in mind that PHP may be accessing the file as the user
   id that the web server runs as (often &#039;nobody&#039;).
  </p>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: <span class="simpara">Рузультати цієї функції
кешуються. Докладніше: <span class="function"><a href="function.clearstatcache.php" class="function">clearstatcache()</a></span>.</span></p></blockquote>
  <div class="tip"><strong class="tip">Підказка</strong><p class="simpara">Починаючи з PHP 5.0.0, ця
функція також може бути використана з <em>деякими</em>
URL-обгортками. На сторінці <a href="wrappers.php" class="xref">Підтримувані протоколи та обгортки</a> вказано, які обгортки
підтримують сімейство функцій <span class="function"><a href="function.stat.php" class="function">stat()</a></span>.</p></div>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    The check is done using the real UID/GID instead of the effective one.
   </p>
  </p></blockquote>
  <p class="para">
   This function may return <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> for directories. Use
   <span class="function"><a href="function.is-dir.php" class="function">is_dir()</a></span> to distinguish file and directory.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.is-readable-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.is-writable.php" class="function" rel="rdfs-seeAlso">is_writable()</a> - Tells whether the filename is writable</span></li>
    <li><span class="function"><a href="function.file-exists.php" class="function" rel="rdfs-seeAlso">file_exists()</a> - Checks whether a file or directory exists</span></li>
    <li><span class="function"><a href="function.fgets.php" class="function" rel="rdfs-seeAlso">fgets()</a> - Gets line from file pointer</span></li>
   </ul>
  </p>
 </div>


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