suxiaolu 发表于 2011-2-12 00:30:56

文件上传的问题

本帖最后由 suxiaolu 于 2011-2-12 00:32 编辑


$config['allowed_types'] = 'jpg|gif';
$this->load->library('upload', $config);
$this->upload->do_upload('***');

$config['allowed_types'] = 'jpg|gif|png';
$this->load->library('upload', $config);
$this->upload->do_upload('***');


我在一个表单里有两个上传的字段,在提交后处理的时候,我想为每个字段设置不同的规则,为什么第二次设置的'allowed_types'不生效?就是说我在第二个字段中上传一个png格式的图片会报错。

Hex 发表于 2011-2-12 00:59:13

老问题了,参考 http://codeigniter.org.cn/forums/thread-4518-1-1.html

suxiaolu 发表于 2011-2-12 08:57:16

多谢了,只是简单搜了下论坛,没搜到这个帖子,呵呵
页: [1]
查看完整版本: 文件上传的问题