请输入您要查询的百科知识:

 

词条 is_readable
释义

定义和用法

is_readable() 函数判断指定文件名是否可读。

语法

is_readable(file)

参数 描述

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 readablePHP Filesystem 函数

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/20 3:30:06