Introduction
In this article I describe the PHP FileSystem functions is_readable, is_uploaded, is_writable and is_writeable. To learn some other FileSystem functions, go to:
- FileSystem Function in PHP: PART 1
- FileSystem Function in PHP: PART 2
- FileSystem Function in PHP: PART 3
- FileSystem Function in PHP: PART 4
- FileSystem Function in PHP: PART 5
- FileSystem Function in PHP: PART 6
- FileSystem Function in PHP: PART 7
- FileSystem Function in PHP: PART 8
- FileSystem Function in PHP: PART 9
- FileSystem Function in PHP: PART 10
- FileSystem Function in PHP: PART 11
- FileSystem Function in PHP: PART 12
PHP is_readable() Function
The PHP FileSystem is_readable function checks whether a file exists and is readable and it returns true if the file or directory specified by the filename exists and is readable or false on failure.
Syntax
| is_readable(file) |
Parameter in is_readable function
The parameter of the function is:
| Parameter | Description |
| file | It specifies the file to check. |
Example
An example of the function is:
<?php
$file = "test.txt";
if(is_readable($file))
{
echo ("$file is <b>readable.</b>");
}
else
{
echo ("$file is not <b>readable.</b>");
}
?>
Output
PHP is_uploaded() Function
The PHP FileSystem is_readable function checks whether the file was uploaded via HTTP POST and it returns true on success and false on failure.
Syntax
| is_uploaded(file) |
Parameter in is_uploaded function
The parameter of the function is:
| Parameter | Description |
| file | It specifies the file to check. |




Join the conversation! Your thoughts help the community grow.