| 参数 | 描述 |
|---|---|
| file | 必需。规定要检查的文件。 |
如果由 file 指定的文件或目录存在并且可读,则返回 TRUE。
注释:本函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。
<?php
$file = "test.txt";
if(is_readable($file))
{
echo ("$file is readable");
}
else
{
echo ("$file is not readable");
}
?>
输出:
test.txt is readable
|
制作:
http://www.7di.net 生活网搜集整理 参考: http://www.w3school.com.cn/php/func_filesystem_is_readable.asp |