PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Testing if a File is Readable

The static method Zend_Loader::isReadable($pathname) returns TRUE if a file at the specified pathname exists and is readable, FALSE otherwise.

Example 531. Example of isReadable() method

<?php
if (Zend_Loader::isReadable($filename)) {
    
// do something with $filename
}

The $filename argument specifies the filename to check. This may contain path information. This method is a wrapper for the PHP function is_readable(). The PHP function does not search the include_path, while Zend_Loader::isReadable() does.

Zend Framework