用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2089|回复: 1
收起左侧

[HELP] flash上传图片问题,收到来自网页提示fileid:【img的地址】

[复制链接]
发表于 2012-9-22 10:35:27 | 显示全部楼层 |阅读模式
public function swfupload_up()
  {
                           //文件目录
  $this->config->load('custom',TRUE);
  $custom =  $this->config->item('custom');
  $file_forder =$custom['file']['upload_path'];;  
        $config['upload_path'] = $file_forder;   
  (!is_dir($config['upload_path']))&&@mkdir($config['upload_path'],0777,true);                //文件目录
       //文件保存路径  这儿我用的是实际路径
        $config['allowed_types'] = $custom['file']['upload_file_type'];  //允许上传格式
        $config['max_size'] = $custom['file']['upload_file_size'];                           //允许上传大小
  $config['max_width'] = $custom['file']['upload_image_size_h'];
  $config['max_height'] = $custom['file']['upload_image_size_w'];
        $config['file_name']     = $custom['file']['file_name'];                  //存放的文件名
        
        $this->load->library('upload', $config);
        
        $field_name = 'Filedata';   //上传表单字段名
        
        if ($this->upload->do_upload($field_name))
        {
            $data   = $this->upload->data();
   $source =FCPATH.$file_forder.$data['file_name'];
   $samll=$custom['file_small'];//创建小图
      creat_small_img($source,$samll);
            $img = $file_forder.$data['file_name'];      //返回给SWF AND JQUERY显示的IMAGE地址
            
            exit ('FILEID:'.$img);
        }
  else
  {
   //上传失败返回error图片
   $img = base_url().'assets/img/error.jpg';      //返回给SWF AND JQUERY显示的IMAGE地址
            exit ('FILEID:'.$img);
  }

我上传的时候就收到  来自网页的提示 ---------------------------
来自网页的消息
---------------------------
FILEID:data/attachments/productlist/2012/09/22/201209221033314036.jpg
---------------------------
确定   
---------------------------
, 但是图片 是已经上传了  
 楼主| 发表于 2012-9-22 10:51:16 | 显示全部楼层
有谁知道是怎么回事呀,之前传的时候都好的 , 突然就变这样了

本版积分规则