|
public function do_upload(){
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'rar|zip|7z|psd|ai|fla|doc|ppt|xls|txt|flv|f4v|mp4|mp3|wav|wmv|swf|jpeg|gif|jpg|png';
$config['max_size'] = '1000000000';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$this->load->library('upload', $config);
if ($this->upload->do_upload('file')){
return $this->upload->data();
} else{
$_SESSION['error_message'] = $this->upload->display_errors();
}
}
乱码文件
|
|