is_readable
Determine whether the file exists and is readable
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
is_readable ( file )
| parameter | describe |
|---|---|
| file | Required. Specify documents to be inspected. |
Returns TRUE if the file or directory specified by the file exists and is readable.