您好,欢迎访问一九零五行业门户网

php中的is_readable函数怎么用

php中的is_readable函数的用法:【is_readable(file)】。is_readable函数用于判断指定文件是否可读,如果指定文件或目录存在并可读,则函数返回true,否则,函数返回false。
php is_readable函数用于判断指定文件是否可读,其语法是is_readable(file),参数file必需,指的是规定要检查的文件。
(推荐教程:php视频教程)
php is_readable函数怎么用?
作用:判断指定文件是否可读。
语法:
is_readable(file)
参数:
file必需。规定要检查的文件。
说明:
如果由 file 指定的文件或目录存在并且可读,则返回 true。
php is_readable()函数 示例
<?php$file = is_readable("./test.txt");if($file == 1){ echo "该文件是可读的";}else{ echo "该文件不可读";}?>
以上就是php中的is_readable函数怎么用的详细内容。
其它类似信息

推荐信息