|  | 
 
| 关于循环处理缩略图的问题 一下是代码:
 
 PHP复制代码 复制代码 
 
     for($i=1;$i<$this->input->post('total');$i++)
   {
    $configThumb['image_library'] = $this->input->post('image_library');
    $configThumb['create_thumb'] = ''.$this->input->post('create_thumb').'';
    $configThumb['thumb_marker'] = $this->input->post('thumb_marker');
    $configThumb['width'] = $this->input->post('width');
    $configThumb['height'] = $this->input->post('height');
    $configThumb['source_image'] = $this->input->post('source_image').sprintf("%03d", $i).'.jpg';
    $configThumb['new_image'] = $this->input->post('new_image').sprintf("%03d", $i).'.jpg';
    $this->load->library('image_lib', $configThumb);
    if ( ! $this->image_lib->resize()){
     echo $this->image_lib->display_errors();
    }
    echo $configThumb['new_image'].'<br>';
    echo $configThumb['source_image'].'<br>';
    echo '<hr>';
     }
 
 
 执行的意图是:
 例如:提交后将该目录下20个图片:001.jpg --020.jpg
 生成做略图:thumb_001.jpg -thumb_020.jpg
 
 如果取掉循环可以正常。加上循环后只能生成第一个图片。后面的都不行。
 请帮助?
 | 
 |