PHP is_writable() 函数
PHP 教程
· 2019-01-25 11:29:11
定义和用法
is_writable() 函数检查指定的文件是否可写。
如果文件可写,该函数返回 TRUE。
语法
is_writable(file)
| 参数 | 描述 |
|---|---|
| file | 必需。规定要检查的文件。 |
提示和注释
注释:该函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。
实例
<?php
$file = "test.txt";
if(is_writable($file))
{
echo ("$file is writeable");
}
else
{
echo ("$file is not writeable");
}
?>
上面的代码将输出:
test.txt is writeable
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
The Art of Computer Programming, Volume 2
Knuth, Donald E. / Addison-Wesley Professional / 1997-11-04 / USD 79.99
Finally, after a wait of more than thirty-five years, the first part of Volume 4 is at last ready for publication. Check out the boxed set that brings together Volumes 1 - 4A in one elegant case, and ......一起来看看 《The Art of Computer Programming, Volume 2》 这本书的介绍吧!