简体   繁体   English

PHP中的mime_content_type()支持

[英]mime_content_type() support in php

I am trying to install an instance of forma.lms on WAMP Server running on Windows 8 (not sure how relevant the OS might be). 我正在尝试在Windows 8上运行的WAMP Server上安装forma.lms实例(不确定操作系统的相关性)。

As with most PHP frameworks, there is a checklist in the installation process which displays a green affirmation for all the present required features. 与大多数PHP框架一样,安装过程中有一个清单,其中列出了所有当前所需功能的绿色确认。 I have one red rejection in the form of mime_content_type() support: OFF 我有mime_content_type()支持形式的一个红色拒绝: OFF

I checked my wamp settings and looked in the listed php and apache features and neither had any mime feature that was either not ticked or applicable to the missing module. 我检查了我的Wamp设置,并查看了列出的php和apache功能,但都没有任何mime功能,这些功能既未打勾,又不适用于缺少的模块。

What pray tell, might I do to free this up? 祈祷能告诉我什么,我可以释放它吗?

Thanks in advance 提前致谢

The mime_content_type error is due to it not being available in your PHP build (it has been deprecated for some time now). mime_content_type错误是由于它在您的PHP版本中不可用(它已经过时了一段时间)。 But you could create that function yourself: http://php.net/mime_content_type 但是您可以自己创建该函数: http : //php.net/mime_content_type

If you are using the latest version of the class, you can also override the mime type by passing 'Content-Type' => 'your-mime-type' to putObject()'s $requestHeaders. 如果您使用的是最新版本的类,则还可以通过将'Content-Type'=>'your-mime-type'传递给putObject()的$ requestHeaders来覆盖mime类型。 See: https://github.com/tpyo/amazon-s3-php-class#uploading-objects 参见: https : //github.com/tpyo/amazon-s3-php-class#uploading-objects

There is an update in the works to allow custom mime lookup callbacks too. 作品中有一个更新,也允许自定义mime查找回调。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM