php 查看文件的属性
php 查看文件的属性 [代码片段(21行)]
<?php
$myfile = './test.txt';
if (is_readable ($myfile)) {
echo 'The file can be read!', '\n';
} else {
echo 'The file cannot be read.', '/n';
}
if (is_writable ($myfile)) {
echo 'The file can be used for writing!', '/n';
} else {
echo 'The file cannot be used for writing.', '/n';
}
if (is_executable ($myfile)) {
echo 'The file is executable!', '\n';
} else {
echo 'The file is not executable.', '\n';
}
?>
- 上一篇:php检查邮件地址是否正确
- 下一篇:php ajax 静态分页 过程形式
精彩图集
精彩文章






