PHPMailer\PHPMailer
PHPMailer::filenameToType()
Map a file name to a MIME type. Defaults to 'application/octet-stream', i.e.. arbitrary binary data.
Метод класса: PHPMailer{}
Хуков нет.
Возвращает
Строку
.
Использование
$result = PHPMailer::filenameToType( $filename );
- $filename(строка) (обязательный)
- A file name or full path, does not need to exist as a file
Код PHPMailer::filenameToType() PHPMailer::filenameToType WP 6.7.1
public static function filenameToType($filename) { //In case the path is a URL, strip any query string before getting extension $qpos = strpos($filename, '?'); if (false !== $qpos) { $filename = substr($filename, 0, $qpos); } $ext = static::mb_pathinfo($filename, PATHINFO_EXTENSION); return static::_mime_types($ext); }