PHPMailer\PHPMailer
PHPMailer::fileIsAccessible()
Check whether a file path is safe, accessible, and readable.
{} It's a method of the class: PHPMailer{}
No Hooks.
Return
true|false
.
Usage
$result = PHPMailer::fileIsAccessible( $path );
- $path(string) (required)
- A relative or absolute path to a file
Code of PHPMailer::fileIsAccessible() PHPMailer::fileIsAccessible WP 6.0
protected static function fileIsAccessible($path) { if (!static::isPermittedPath($path)) { return false; } $readable = file_exists($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; }