我们的优势: 专业网站建设公司,顶尖设计师量身定制 配备高配置主机,BGP多线,高速访问 99.999%网站数据可靠性 免费提供快速ICP备案 快速解决网站问题
您的位置:首页 > 观点争锋 > 小元观点

完美解决The filetype you are attempting to upload is not allowed.

来源: | 浏览量:233 | 发布时间:2020-04-27 17:57:58

1 修改mine文件:

CI支持各种文件上传-文件类型(Linux + window)

$mimes = array( 'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
'bin' => 'application/macbinary',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => 'application/x-photoshop',
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'php' => 'application/x-httpd-php',
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => 'application/x-javascript',
'swf' => array('application/x-shockwave-flash','application/octet-stream'),
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'rar' => array('application/x-rar-compressed', 'application/x-rar', 'application/rar', 'application/octet-stream'),
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/octet-stream'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-windows-bmp'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg','application/octet-stream'),
'jpg' => array('image/jpeg', 'image/pjpeg','application/octet-stream'),
'jpe' => array('image/jpeg', 'image/pjpeg','application/octet-stream'),
'png' => array('image/png', 'image/x-png','application/octet-stream'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => 'text/css',
'html' => 'text/html',
'htm' => 'text/html',
'shtml' => 'text/html',
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => 'text/xml',
'xsl' => 'text/xml',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie',
'pdf' => array('application/pdf', 'application/x-download', 'application/octet-stream'),
'doc' => array('application/msword','application/octet-stream'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword','application/x-zip', 'application/octet-stream'),
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel', 'application/x-zip','application/msword', 'application/octet-stream'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/x-zip', 'application/vnd.ms-excel', 'application/octet-stream'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/octet-stream', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'),
'pptx' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/octet-stream', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json')
);

第二步:修改main文件

需要什么格式添加什么格式。

ok!完美解决。




阅读提示:

      湖北元润科技有限公司(网址:www.yuanrungroup.com)成立于2012年,定位为富媒体整合推广服务提供商。多年来,公司致力于为企业客户提供完整的互联网应用服务,服务范围涵盖基础的域名服务、虚拟主 机、企业邮箱、网站建设、网络营销、服务器租用、服务器托管、CDN加速等领域。公司始终秉承以客户利益为中心 的公司理念,致力于向各行业网络用户提供定制化运营方案,为协助客户成为其所在行业的网络领先品牌而不懈努力。
      2015年公司战略调整,以软件开发为核心覆盖企业办公,政务OA,微信营销,电子商务,大数据, SEO等周边领域,成功完成了宜昌某政府改版项目,宜昌某局改版项目,某发改委建设项目,某师大建设项目,武汉某农业政务改版项目。同年 成功完成青岛研发中心和武汉开发中心的部署。目前服务于4家上市公司日照港,宇阳集团,湖北能源,昆仑能源; 本土100余家,业务辐射大连,北京,上海,杭州,广州,深圳,柳州,昆明等地。经客户同意公开的优秀作品有迪亚罗兰,红味西饼,锦港企业,宇阳集团,陈氏木业,东盛云企业,希捷硬盘,罗技鼠标等。元润科技已经为300+客户提供技术支持,服务在酒店,家居,食品,化工,机械,建筑,整形,政务,农产品,制造等多个领域,未来我们将覆盖更多领域,成为真正的中小企业信息化领航企业。

      元润科技面向宜昌,荆州,恩施等地区提供高端网站建设,高端网站设计,高端网站制作,网站改版,OA系统开发,政务系统开发,微信开发,客户端开发,商城系统建设,SEO优化,软件二开,智慧城市,服务器托管,UI设计等全方位的信息化解决方案。





聚合标签:

现在填写联系方式,即可获得一对一客服服务

您的信息已提交成功!

客户经理会在24小时内与您联系! 立即咨询 咨询电话: 0717-6901988