Question

The documentation for mime_content_type says

This function has been deprecated as the PECL extension Fileinfo provides the same functionality (and more) in a much cleaner way.

That link is to the Fileinfo extension. That page itself links to its mime_content_type implementation. However, this page is one and the same page that says that it is deprecated in favour of the Fileinfo implementation. So there is an infinite recursive loop in the documentation.

So, what is it that has been deprecated, and where is the implementation which it has been deprecated in favour of?

Était-ce utile?

La solution

mime_content_type is not deprecated. It was apparently just a mistake in the documentation.

See this bug report

Autres conseils

The new function to determine file types is finfo_file, which will return the file's mime type as a string (like mime_content_type).

mime_content_type has been deprecated because the finfo_* functions are also accessible via a more modern, object oriented class.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top