HTTP_Download::guessContentType() -- Guess content type of file
Opis
Use only if you send a file.
First we try to use MIME_Type, if installed, to
detect the content type, else we check if ext/mime_magic is loaded and
properly configured.
Returns PEAR_Error if:
|
MIME_Type failed to detect a proper content type
(HTTP_DOWNLOAD_E_INVALID_CONTENT_TYPE)
|
|
ext/magic.mime is not installed, or not properly configured
(HTTP_DOWNLOAD_E_NO_EXT_MMAGIC)
|
|
mime_content_type() couldn't guess content type or returned
a content type considered to be bogus by setContentType()
(HTTP_DOWNLOAD_E_INVALID_CONTENT_TYPE)
|
Zwracana wartość
Zwraca TRUE w przypadku powodzenia,
PEAR_Error w przypadku niepowodzenia.
Uwagi
Ta funkcja nie może być wywołana
statycznie.