php 源码之判断文件是否可读:
Is the file readable: is_readable()
<?php
$file = \"test.txt\";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
if ( ! file_exists( $f ) ){
print \"$f does not exist<BR>\";
return;
}
print \"$f is \".(is_readable( $f )?\"\":\"not \").\"readable<br>\";
}
?>
php 源码之判断文件是否可写:
Is the file writable: is_writable()
<?php
$file = \"test.txt\";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
if ( ! file_exists( $f ) ){
print \"$f does not exist<BR>\";
return;
}
/* http://www.manongjc.com/article/1370.html */
print \"$f is \".(is_writable( $f )?\"\":\"not \").\"writable<br>\";
}
?> 继续阅读与本文标签相同的文章
上一篇 :
Steam 有了中国名字:蒸汽平台
下一篇 :
php filectime获取文件创建时间
-
谷歌宣布Daydream VR头显终止支持 以失败收场
2026-05-14栏目: 教程
-
微软正在测试面向Windows 10 1903的重要补丁
2026-05-14栏目: 教程
-
这款游戏曾被称为国产之光,现沦为“骗玩家充值”游戏,网友:再见
2026-05-14栏目: 教程
-
金属3D打印专家铂力特2019用户大会尽显大国实力
2026-05-14栏目: 教程
-
Google Books迎15岁生日 重新调整后更加方便
2026-05-14栏目: 教程
