What is Filesystem isreadable in PHP

In this article I am going to explain about is_readable function in PHP.
  • 1221

PHP is_readable() Function

The filesysytem is_readable function checks whether the specified file is readable.

Syntax of is_readable function

is_readable(file,)

Parameters in is_readable function

It has only parameter:

Parameter Description
file It specifies the file to check.

Example of filesystem is_readable function

<html>

<body>
 

<?php

$file = "C:\wamp\www\Dinesh\Mcn.txt";

if(is_readable($file))

  {

  echo ("$file is readable");

  }

else

  {

  echo ("$file is not readable");

  }

?>
 

</body>

</html>

 

Output:

isreadablefunctionphp.jpg

You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.