Query: is_readable
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IS_READABLE(3) 1 IS_READABLE(3) is_readable - Tells whether a file exists and is readableSYNOPSISbool is_readable (string $filename)DESCRIPTIONTells whether a file exists and is readable.PARAMETERSo $filename - Path to the file.RETURN VALUESReturns TRUE if the file or directory specified by $filename exists and is readable, FALSE otherwise.EXAMPLESExample #1 is_readable(3) example <?php $filename = 'test.txt'; if (is_readable($filename)) { echo 'The file is readable'; } else { echo 'The file is not readable'; } ?>ERRORS/EXCEPTIONS Upon failure, an E_WARNING is emitted.NOTESKeep in mind that PHP may be accessing the file as the user id that the web server runs as (often 'nobody'). Safe mode limitations are not taken into account before PHP 5.1.5. Note The results of this function are cached. See clearstatcache(3) for more details. Tip As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine which wrappers support stat(3) family of functionality. Note The check is done using the real UID/GID instead of the effective one. This function may return TRUE for directories. Use is_dir(3) to distinguish file and directory.SEE ALSOis_writable(3), file_exists(3), fgets(3). PHP Documentation Group IS_READABLE(3)
Related Man Pages |
---|
filemtime(3) - php |
is_link(3) - php |
filesize(3) - php |
fileatime(3) - php |
is_dir(3) - php |
Similar Topics in the Unix Linux Community |
---|
search files |
When running if condition, getting the following error |
find, if exists then append for file with same name |
Tip: file_exists function |
Match filename pattern with -f |