Check if file is writable

is_writable() function

<?php
$file_path = 'example.txt';

if (is_writable($file_path)) {
    echo "The file is writable.";
} else {
    echo "The file is not writable.";
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *