PHPMailer\PHPMailer
PHPMailer::isPermittedPath
Check whether a file path is of a permitted type. Used to reject URLs and phar files from functions that access local file paths, such as addAttachment.
Метод класса: PHPMailer{}
Хуков нет.
Возвращает
true|false.
Использование
$result = PHPMailer::isPermittedPath( $path );
- $path(строка) (обязательный)
- A relative or absolute path to a file.
Код PHPMailer::isPermittedPath() PHPMailer::isPermittedPath WP 6.9.1
protected static function isPermittedPath($path)
{
//Matches scheme definition from https://www.rfc-editor.org/rfc/rfc3986#section-3.1
return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path);
}