PHP is_writable() Function

PHP is_link() Function
PHP is_readable() Function

In this article, you will learn how to check if the file is writeable or not in PHP. The is_writable() function in PHP checks whether the specified filename is writable.

what is the syntax of the IS_WRITABLE function in php?

IS_WRITABLE(file)
ParameterDescription
fileRequired. Specifies the path to the file to check
PHP IS_WRITABLE() method

examples of the IS_WRITABLE function

Example 1. In this example, we check whether the specified filename is writable.

<?php
$file = "test.txt";
if(is_writable($file)) {
  echo ("$file is writable");
} else {
  echo ("$file is not writable");
}
?>
PHP is_link() Function
PHP is_readable() Function
en English
X
Scroll to Top