The is_readable() function checks whether the specified file is readable.

Syntax: is_readable(file)

Description:

The parameter “file” is Required. It specifies the file to check.

This function returns TRUE if the file is readable.

Example:
Code:

$file = "test.txt";
if(is_readable($file))
 echo ("$file is readable");
  }
else
  {
  echo ("$file is not readable");
 }

Output:

eXTReMe Tracker