Hello frind 我想在两个不同地点上上载两幅图像,但在同一地点仍收到传票。 请帮助
//upload images
//some $config vars for image
$config[ upload_path ] = ./images/articles ;
$config[ allowed_types ] = gif|jpg|jpeg|png|mp3|wav ;
$config[ max_size ] = 0 ;
$config[ remove_spaces ] = true;
$config[ overwrite ] = false;
$config[ max_width ] = 0 ;
$config[ max_height ] = 0 ;
$this->load->library( upload , $config);
//upload main image
if(!$this->upload->do_upload( a_image )){
$e = $this->upload->display_errors();
//print_r($e);
}
$image = $this->upload->data();
if($image[ file_name ]){
$data[ a_image ] = "images/articles/". $image[ file_name ];
}
unset($config);
//now upload thumb
//some $config vars for thumb
$config[ upload_path ] = ./images/articles/thumb ;
$config[ allowed_types ] = gif|jpg|jpeg|png|mp3|wav ;
$config[ max_size ] = 0 ;
$config[ remove_spaces ] = true;
$config[ overwrite ] = false;
$config[ max_width ] = 0 ;
$config[ max_height ] = 0 ;
$this->load->library( upload , $config);
//upload thumbnail
if(!$this->upload->do_upload( a_thumbnail )){
$this->upload->dispaly_errors();
}