Check if the specified file is readable with is_readable() function in PHP
Description
The following code shows how to check if the specified file is readable with is_readable() function.
Example
/*from w w w. j a v a2 s. c om*/
<?php
$file = "test.txt";
if(is_readable($file)){
echo ("$file is readable");
}else{
echo ("$file is not readable");
}
?>
The code above generates the following result.