©
This document uses PHP Chinese website manual Release
(PHP 5 >= 5.1.2)
SplFileInfo::isReadable — Tells if file is readable
Check if the file is readable.
此函数没有参数。
Returns TRUE
if readable, FALSE
otherwise.
Example #1 SplFileInfo::isReadable() example
<?php
$info = new SplFileInfo ( __FILE__ );
var_dump ( $info -> isReadable ());
$info = new SplFileInfo ( 'foo' );
var_dump ( $info -> isReadable ());
?>
以上例程的输出类似于:
bool(true) bool(false)