Current Location: Home> Function Categories> is_readable

is_readable

Determine whether the file exists and is readable
Name:is_readable
Category:File system
Programming Language:php
One-line Description:Determine whether the file is readable.

Definition and usage

is_readable() function determines whether the specified file name is readable.

实例

<?php
$file = "test.txt";
if(is_readable($file))
  {
  echo ("$file is readable");
  }
else
  {
  echo ("$file is not readable");
  }
?>

输出:

test.txt is readable

grammar

 is_readable ( file )
parameter describe
file Required. Specify documents to be inspected.

illustrate

Returns TRUE if the file or directory specified by the file exists and is readable.

Similar Functions
  • See unlink() or unset() (PHP does not have delete keywords or functions) delete

    delete

    Seeunlink()orunset()
  • Create a temporary file tmpfile

    tmpfile

    Createatemporaryfile
  • Positioning in file pointer fseek

    fseek

    Positioninginfilepoi
  • Get the file owner fileowner

    fileowner

    Getthefileowner
  • Get the inode modification time of the file filectime

    filectime

    Gettheinodemodificat
  • Rewind the file pointer position rewind

    rewind

    Rewindthefilepointer
  • Export buffered content to file fflush

    fflush

    Exportbufferedconten
  • Change the group to which the file belongs chgrp

    chgrp

    Changethegrouptowhic
Popular Articles