PHP的is_writeable() 函数判断文件是否存在 不指定

jed , 2009-4-9 19:40 , 代码编程 , 评论(0) , 阅读(4029) , Via 本站原创 | |
is_writeable() 函数判断指定的文件是否可写。

该函数是 is_writable() 函数的别名。

语法

is_writeable(file)

说明
如果文件存在并且可写则返回 true。file 参数可以是一个允许进行是否可写检查的目录名。



<?php
$file = "test.txt";
if(is_writeable($file))
  {
  echo ("$file is writeable");
  }
else
  {
  echo ("$file is not writeable");
  }
?>

Tags: ,
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]