PHP is_writable() Function

PHP is_writable Function


Definition :

The PHP is_writable() function checks whether a file exists and is writable.

Note: The results of this function are cached. Use clearstatcache() function to clear the cache.

Syntax

  is_writable(file)

Parameter 
Parameter Description
file Required. Specifies the path to the file to check

Given below Check whether the specified filename is writable:

Output : demo.txt is writable