$config['upload_path'] = './uploadfile/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '1000';
$config['encrypt_name']=TRUE;
$config['allowed_no_file']=TRUE;//这个配置选项就是我扩展的,意思是允许不选择上传文件,这样你用$name=$upload_data['file_name']得到是一个空字符串。程序默认的是$config['allowed_no_file']=FALSE;
$this->load->library('upload', $config);