php源码之检测文件是否可读可写(is_writable is_readable实例)
|
php 源码之判断文件是否可读: Is the file readable: is_readable() $file = "test.txt"; outputFileTestInfo( $file ); function outputFileTestInfo( $f ){ if ( ! file_exists( $f ) ){ print "$f does not exist return; } print "$f is ".(is_readable( $f )?"":"not ")."readable } ?> php 源码之判断文件是否可写: Is the file writable: is_writable() $file = "test.txt"; outputFileTestInfo( $file ); function outputFileTestInfo( $f ){ if ( ! file_exists( $f ) ){ print "$f does not exist return; } /* http://www.manongjc.com/article/1370.html */ print "$f is ".(is_writable( $f )?"":"not ")."writable } ?> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
