The is_writable() function checks the file is writable.
This function returns TRUE if the file is writable.
Syntax
is_writable(file)
Example
$filename = 'content.txt';
if (is_writable($filename)) {
echo 'File is writable';
} else {
echo 'File is not writable';
}
Copyright ©2022 coderraj.com. All Rights Reserved.