$loader = Zend_Loader::getInstance(); if ($loader->isReadable('sample.txt')) { echo "File is readable"; } else { echo "File is not readable"; }
$loader = Zend_Loader::getInstance(); if ($loader->isReadable('mydir')) { echo "Directory is readable"; } else { echo "Directory is not readable"; }Both examples above are part of the Zend Framework's Loader package library. The Loader class provides methods for loading classes, files, and other resources dynamically. The Zend_Loader package library is part of the Zend Framework, which is an open-source PHP framework used for developing scalable and high-performance web applications.