php is_readable() function


  Translation results:

UK [ˈri:dəbl] US [ˈridəbəl]

adj.Easy to read; easy to understand

php is_readable() functionsyntax

Function: Determine whether the specified file name is readable.

Syntax: is_readable(file)

## Parameters:

ParameterDescriptionfile Required. Specifies the documents to be checked.

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

php is_readable() functionexample

<?php
$file = is_readable("./test.txt");
if($file == 1)
{
    echo "该文件是可读的";
}else{
    echo "该文件不可读";
}
?>

Home

Videos

Q&A