PHPMailer\PHPMailer

PHPMailer::fileIsAccessible()protected staticWP 1.0

Check whether a file path is safe, accessible, and readable.

Метод класса: PHPMailer{}

Хуков нет.

Возвращает

true|false.

Использование

$result = PHPMailer::fileIsAccessible( $path );
$path(строка) (обязательный)
A relative or absolute path to a file

Код PHPMailer::fileIsAccessible() WP 6.5.2

protected static function fileIsAccessible($path)
{
    if (!static::isPermittedPath($path)) {
        return false;
    }
    $readable = is_file($path);
    //If not a UNC path (expected to start with \\), check read permission, see #2069
    if (strpos($path, '\\\\') !== 0) {
        $readable = $readable && is_readable($path);
    }
    return  $readable;
}