English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Tutorial Básico PHP

Tutorial Avançado PHP

PHP & MySQL

Manual de Referência PHP

Uso e exemplo da função PHP is_readable()

PHP Filesystem Referência

A função is_readable() pode verificar se o arquivo especificado é legível. Se o arquivo for legível, esta função retorna true.

Sintaxe

bool is_readable ( string $filename )

Esta função pode determinar se um arquivo existe e é legível.

Exemplo online

<?php
  $file = "/PhpProject/php/phptest.txt"
   if(is_readable($file)) {
      echo ("$file é legível");
   } else {
      echo ("$file não é legível");
   }
?>

Resultados de saída

/PhpProject/php/phptest.txt é legível

PHP Filesystem Referência