How to use Filesystem iswriteable in PHP
In this article I am going to explain about is_writeable function in PHP.
PHP is_writeable() Function
The filesystem is_writeable function checks whether the specified file is writeable or not. The function returns true on success.
Syntax of is_writeable function
Parameters in is_writeable function
It has only parameter:
Parameter |
Description. |
file |
It specifies the file to check. |
Example of filesystem is_writeable function
<html>
<body>
<?php
$filename = "C:\wamp\www\Dinesh\Mcn.txt";
if(is_writeable($filename))
{
echo ("$filename is writeable");
}
else
{
echo ("$filename 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