English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The is_readable() function can check if the specified file is readable. If the file is readable, this function returns true.
bool is_readable ( string $filename )
This function can determine whether a file exists and is readable.
<?php $file = "/PhpProject/php/phptest.txt if(is_readable($file)) { echo ("$file is readable"); } else { echo ("$file is not readable"); } ?>
Output Result
/PhpProject/php/phptest.txt is readable