langziyang 发表于 2010-4-23 11:50:36

如何上传swf文件

本帖最后由 langziyang 于 2010-5-12 15:16 编辑

$config['upload_path'] = './uploads/';
      $config['allowed_types'] = 'gif|jpg|png|swf|flv|rar';
      $config['max_size'] = '0';
      $config['max_width']= '0';
      $config['max_height']= '0';


mimes文件本身带有'swf' => 'application/x-shockwave-flash',

rar文件也不行,swf文件也写上了,上传后提示:
The filetype you are attempting to upload is not allowed.

解决了,上传一个类,代替就行

saturn 发表于 2010-4-23 12:48:40

This is a BUG existing since 1.7.1. For the simple solution if you donnot want to touch the library of the UPLOAD class, please refer to the following link of my Blog:

http://www.cnsaturn.com/posts/a- ... lass-of-codeingiter

Sorry, I cannot type Chinese on this machine right now.

langziyang 发表于 2010-4-23 12:56:49

我又在mimes文件里加了如下东西也不行
'swf'        =>        array('application/x-shockwave-flash','application/x-shockwave-flash2-preview','application/futuresplash','image/vnd.rn-realflash'),

langziyang 发表于 2010-4-23 12:58:40

This is a BUG existing since 1.7.1. For the simple solution if you donnot want to touch the library...
saturn 发表于 2010-4-23 12:48 http://codeigniter.org.cn/forums/images/common/back.gif


    放前面也不行

langziyang 发表于 2010-4-23 13:36:13

解决了…………………………………………………………………………………………………………………………

zhangcjl 发表于 2010-5-1 15:10:09

回复 5# langziyang


    怎么解决的????说说~~呵呵~~:lol

spt119 发表于 2010-5-4 09:11:54

使用第三方swf上传文件。推荐swfupload。

movados 发表于 2010-5-13 15:43:43

swfupload? is good?

seemego 发表于 2010-5-25 16:59:17

swfupload 也无法解决SESSION无法传递的问题
是这样吗?

conqweal 发表于 2010-7-9 21:02:13

,今天我刚发了帖子,,
你可以这么处理
$config['allowed_types'] = 'gif|jpg|png|swf|flv|rar';
改成
$config['allowed_types'] = 'swf|flv|rar|gif|jpg|png|';

没错,所有图片类型置后。。。
页: [1] 2
查看完整版本: 如何上传swf文件