PHP function is_readable() and example


 

PHP function is_readable() and example

In this segment of the tutorial we will learn about the function is_readable() in context of file handling. And also we will see the example related to the is_readable() function

In this segment of the tutorial we will learn about the function is_readable() in context of file handling. And also we will see the example related to the is_readable() function

Syntax for PHP is_readable() Function
bool is_readable(file_name)

  • The PHP is_readable function states whether the given file is readable or not


Example of PHP is_readable() Function

Code
<?php

    $a
=is_readable("c:/rose1/ram.txt");

    if
($a)
    echo
"readable";
    else
    echo
"not readable";
?>


Output
readable

Ads