PHP IS_WRITeABLE() Function

PHP is_uploaded_file() Function
PHP is_file() Function

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

what is the syntax of the IS_WRITeABLE function in php?

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

examples of the IS_WRITeABLE function

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

<?php
$file = "test.txt";
if(is_writeable($file)) {
  echo ("$file is writable");
} else {
  echo ("$file is not writable");
}
?>
PHP is_uploaded_file() Function
PHP is_file() Function

Stay up-to-date about PHP!

We don’t spam!

en English
X
Scroll to Top