English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
A função is_readable() pode verificar se o arquivo especificado é legível. Se o arquivo for legível, esta função retorna true.
bool is_readable ( string $filename )
Esta função pode determinar se um arquivo existe e é legível.
<?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