PHP is_writable() Function

The is_writable() function checks whether the specified file is writeable.This function returns TRUE if the file is writeable.

bool is_writable ( string $filename )

Returns 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.

Example -

ParameterDescription
fileRequired. Specifies the open file to check