php检查文件是否可读和可写
is_readable() 函数判断指定文件名是否可读。
<?php $file = "test.txt" ; if ( is_readable ( $file )) { echo ( "$file is readable" ); } else { echo ( "$file is not readable" ); } ?>is_writeable() 函数判断指定的文件是否可写。
该函数是 is_writable() 函数的别名。
<?php $file = "test.txt" ; if ( is_writeable ( $file )) { echo ( "$file is writeable" ); } else { echo ( "$file is not writeable" ); } ?>查看更多关于php检查文件是否可读和可写 - php文件操作的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did27908