• PHP Video Tutorials

PHP - Function is_writeable()



The is_writeable() function can check whether the specified file is writeable. This function can return true if the file is writeable. It is an alias of is_writable() function.

Syntax

bool is_writeable ( string $filename )

Example

<?php
   $file = "/PhpProject/php/phptest.txt";
   if(is_writeable($file)) {
       echo ("$file is writeable");
   } else {
       echo ("$file is not wrietable");
   }
?>

Output

/PhpProject/php/phptest.txt is writeable
php_function_reference.htm
Advertisements