validateMimeType.php
Table of Contents
Functions
- validateMimeType() : void
- Validate the MIME type of a file against a list of allowed types.
Functions
validateMimeType()
Validate the MIME type of a file against a list of allowed types.
validateMimeType(string $file, array<string|int, mixed> $allowedMimeTypes) : void
Parameters
- $file : string
-
Path to the file to validate.
- $allowedMimeTypes : array<string|int, mixed>
-
List of allowed MIME types. Can include strings or arrays of strings.