我又抛出了一个问题。我如何找到 new_image (Thumb) 名称。在控制器中
//Insert image .............................
$config['upload_path'] = './img/placeholders/blog';
$config['allowed_types'] = 'gif|jpg|png';
$config['encrypt_name'] = TRUE;
$config['remove_spaces'] = TRUE;
$this->upload->initialize($config);
$this->upload->do_upload('blog_images');
//Thumb Image-----------------------------
$image_des = $this->upload->data();
$config['image_library'] = 'gd2';
$config['source_image'] = './img/placeholders/blog/' . $image_des['file_name'];
$config['maintain_ratio'] = TRUE;
$config['create_thumb'] = TRUE;
$config['new_image'] = './img/placeholders/blog/thumb/' . $image_des['file_name'];
$config['width'] = 220;
$config['height'] = 140;
$this->image_lib->initialize($config);
$this->image_lib->resize();
$image_dev = $this->upload->data();
// How Can i find new image name.
$data['blog_img'] = 'img/placeholders/' . $image_des['file_name'];
$data['blog_thumbs'] = ?
转换后,
blog_img 名称为“ e7da891c90586f7c4e89ef5724891a15.jpg ”
blog_thumbs 为“ e7da891c90586f7c4e89ef5724891a15_thumb.jpg ”
我如何找到 new_image (Thumb) 名称。喜欢
$image_des['file_name']