Are there any potential pitfalls or limitations when accessing local disk information using PHP, especially in Unix environments?

One potential pitfall when accessing local disk information using PHP in Unix environments is that the script may not have the necessary permissions to read certain files or directories. To solve this issue, you can use the `is_readable()` function to check if a file or directory is readable before attempting to access it.

$file_path = '/path/to/file.txt';

if (is_readable($file_path)) {
    $file_contents = file_get_contents($file_path);
    echo $file_contents;
} else {
    echo "Unable to read file.";
}