is_readable : is_readable « File Directory « PHP






is_readable

 
<?php
$file_name="permissions.php";

if(is_readable($file_name)) {
    echo ("The file $file_name is readable.<br />");
}
else {
    echo ("The file $file_name is not readable.<br />");
}
?>
  
  








Related examples in the same category

1.is_readable() function checks the readability of both a file and a directory.
2.is_readable() tells you whether you can read a file.