PHP is_writable() function
Definition and Usage
is_writable() function determines whether the specified file is writable.
Syntax
is_writable(file)
Parameter | Description |
---|---|
file | Required. Specify the file to be checked. |
Description
ຖ້າບັນດາສານປະກົດຈະມີ ແລະສາມາດຂຽນໄດ້ ຈະກັບຄືນ true.file ຄຳຕອບກັບ:
ຄຳເຕືອນແລະຄຳເຫັນ
ຄວາມເຫັນ:ຜົນຂອງບູລິບບັນລຸນີ້ຈະຖືກບັນທຶກ. clearstatcache() ທີ່ຈະລົບຄວາມບັນທຶກ.
Example
<?php $file = "test.txt"; if(is_writable($file)) { echo("$file is writeable"); } else { echo("$file is not writeable"); } ?>
Output:
test.txt is writeable