English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

Usage and Examples of PHP is_writeable() Function

PHP Filesystem Reference Manual

The is_writeable() function can check if a specified file is writable. If the file is writable, this function can return true. It is an alias of the is_writable() function.

Syntax

bool is_writeable ( string $filename )

Online Example

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

Output Result

/PhpProject/php/phptest.txt is writable

PHP Filesystem Reference Manual