PHP is_readable() Function

PHP is_writable() Function
PHP is_uploaded_file() Function

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

what is the syntax of the is_readable function in php?

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

examples of the is_readable function

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

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