Check if file is readable

is_readable() function

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

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

Leave a Reply

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