mime_content_type
En esta página
mime_content_type
Detecta el tipo de contenido de un fichero
Descripción#
mime_content_type(resource $filename): string
```php
Devuelve el contenido MIME de un fichero utilizando las informaciones desde el fichero `magic.mime`.
## Parámetros
`filename`
Ruta hacia el fichero a probar.
## Valores devueltos
Devuelve el tipo de contenido en formato MIME, como `text/plain` o `application/octet-stream`, o `false` si ocurre un error.
## Errores/Excepciones
En caso de fallo, se emitirá una advertencia de tipo `E_WARNING`.
## Ejemplos
Ejemplo con `mime_content_type`
```php
El ejemplo anterior mostrará:
image/gif
text/plain
Véase también#
finfo_file
finfo_buffer