How to use Filesystem iswritable in PHP
In this article I am going to explain about is_writable function in PHP.
PHP is_writable() Function
The filesystem is_writable function checks whether the specified file is writable. The function returns true if the filename is exists.
Syntax of is_writable function
Parameters in is_writable function
It has only parameter:
Parameter |
Description. |
file |
It specifies the file to check. |
Example of filesystem is_writable function
<html>
<body>
<?php
$file = "C:\wamp\www\Dinesh\Mcn.txt";
if(is_writable($file))
{
echo ("$file is writeable");
}
else
{
echo ("$file is not writeable");
}
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here