2012-05-14 39 views

回答

0

您需要在$mimes阵列中添加以下内容到/application/config/mimes.php

'vcf' => 'application/octet-stream', 
'vcf' => 'text/x-vcard' 

您还需要设置上传类的allowed_types配置变量。设置配置变量的示例可以在manual page上找到。

$config['allowed_types'] = 'vcf'; 

这将会是有益的知道,如果其他文件类型可以用你的代码,看到一些你已经尝试什么成功上传,也知道什么样的错误,如果任何你想看到的时上传一个vcf文件。

1

如果上述建议没有工作,试试这个:

'vcf' => 'text/plain' 
0

我需要使用

'vcf' => array('text/x-vcard', 'application/octet-stream', 'text/plain', 'text/directory') 

为全覆盖。