PHP is_readable() Function
Complete PHP Filesystem Reference Manual
Definition and Usage
The is_readable() function checks whether the specified file is readable.
Returns TRUE if the file is readable.
Syntax
is_readable(file)
| Parameters | Description |
|---|---|
| file | Required. Specifies the file to check. |
Tips and Notes
**Note:** The results of this function are cached. Use clearstatcache() to clear the cache.
Example
The code above will output:
test.txt is readable
Complete PHP Filesystem Reference Manual