Query: is_writable
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IS_WRITABLE(3) 1 IS_WRITABLE(3) is_writable - Tells whether the filename is writableSYNOPSISbool is_writable (string $filename)DESCRIPTIONReturns TRUE if the $filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writable. Keep 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.PARAMETERSo $filename - The filename being checked.RETURN VALUESReturns TRUE if the $filename exists and is writable.EXAMPLESExample #1 is_writable(3) example <?php $filename = 'test.txt'; if (is_writable($filename)) { echo 'The file is writable'; } else { echo 'The file is not writable'; } ?>ERRORS/EXCEPTIONS Upon failure, an E_WARNING is emitted.NOTESNote 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.SEE ALSOis_readable(3), file_exists(3), fwrite(3). PHP Documentation Group IS_WRITABLE(3)
Related Man Pages |
---|
filectime(3) - php |
is_link(3) - php |
filegroup(3) - php |
is_dir(3) - php |
is_file(3) - php |
Similar Topics in the Unix Linux Community |
---|
Working with a filename |
Wanted to eliminate numeric part from a filename |
append data in a file by using tab delimiter |
removing the filename extension |
Match filename pattern with -f |