Current Location: Home> Function Categories> is_readable

is_readable

Determine whether the file exists and is readable
Name:is_readable
Category:File system
Programming Language:php
One-line Description:Determine whether the file is readable.

Definition and usage

is_readable() function determines whether the specified file name is readable.

实例

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

输出:

test.txt is readable

grammar

 is_readable ( file )
parameter describe
file Required. Specify documents to be inspected.

illustrate

Returns TRUE if the file or directory specified by the file exists and is readable.

Similar Functions