Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

is_readable

Description

The is_readable of Filesystem for PHP tells whether a file exists and is readable.

Syntax

is_readable(
    string $filename
): bool

Parameters

filename

Path to the file.

Return

Returns true if the file or directory specified by filename exists and is readable, false otherwise.

Examples

1 · filename

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';

$return = is_readable($filename);

var_export($return);

?>
true
HomeMenu