开发者

Call to undefined function mime_content_type(), can't change server settings

I have the error found in the title (Call to undefined function mime_content_type()). I've read about re-compiling PHP, as well as using finfo_open(FILEINFO_MIME_TYPE);. The problem with the latter is that my PHP version is 5.2.15, which is too old to support finfo, so I switched to mime_content_type() (which is cleaner, in my opinion), but my server doesn't support that either!

My question is this: can I use ini_set() to set a value so I can use mime_content_type(), or is there another (hackier maybe) way to get a file's mime type?

Here is my PHPinfo(): h开发者_运维技巧ttp://staging.cliquesoft.org/cs/infos.php

Thanks for any help.


You can use the reimplementation from http://upgradephp.berlios.de/. It defines te mime_content_type function if missing. You find it in include("ext/mime.php");

There's also a version in PEARs PHP_Compat.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜