cmsphp 发表于 2011-1-23 16:39:55

在线等--ftp library 用法

试图
<input name="userfile"id="userfile" type="file" class="s_inputFile fl" size="60" />

控制器

//上传照片开始
    $path = $_FILES ['userfile']['tmp_name'];
    $this->load->library('ftp');
    $config['hostname'] = '211.144.119.182';
    $config['username'] = 'zexy-pic';
    $config['password'] = '123456';
    $config['debug'] = TRUE;
    $this->ftp->connect($config);
    $destpath = '/yang';
    $this->ftp->upload($path, $destpath, 'ascii', 0777);
    $list = $this->ftp->list_files('/yang');                        
    print_r($list);
    $this->ftp->close();
    //上传照片结束



报错:
An Error Was Encountered
Unable to upload the specified file. Please check your path.

Hex 发表于 2011-1-23 20:39:40

先上传,再处理FTP,不能一块儿处理。
页: [1]
查看完整版本: 在线等--ftp library 用法