is_writeable
is_writable 的別名
is_writeable()函數判斷指定的文件是否可寫。
該函數是is_writable()函數的別名。
<? php
$ file = “ test.txt” ;
如果( is_writable ( $ file ) )
{
echo ( “ $ file是可寫的” ) ;
}
別的
{
echo ( “ $ file不可寫” ) ;
}
? >
輸出:
test.txt是可以寫的
is_writeable ( file )
| 參數 | 描述 |
|---|---|
| file | 必需。規定要檢查的文件。 |
如果文件存在並且可寫則返回true。 file參數可以是一個允許進行是否可寫檢查的目錄名。