PHP - Manual: SplFileInfo::isReadable
2025-02-27
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::isReadable — Tells if file is readable
此函数没有参数。
示例 #1 SplFileInfo::isReadable() example
<?php
$info = new SplFileInfo('readable.jpg');
if ($info->isReadable()) {
echo $info->getFilename() . ' is readable';
}
?>
以上示例的输出类似于:
readable.jpg is readable
官方地址:https://www.php.net/manual/en/splfileinfo.isreadable.php