/** * ファイルアップロード * * @param string localpath * @param string Remotepath * @return boolean */ function upload($localpath, $rempath) { if (!$this->_is_conn()) { return FALSE; } $this->changeidir(); return parent::upload($localpath, $rempath); }
/** * Constructor * * @access public * * Calls the parent constructor */ public function __construct($config = array()) { parent::__construct($config); }
require_once 'Ftp.php'; if (ob_get_level() == 0) { ob_start(); } $message = shell_exec('/home/centftp/example365up/example.sh'); echo nl2br($message); echo "<br/>本地同步完成。"; echo "<hr/>"; //同步本地更新文件列表到远程ftp服务器 $test = array('hostname' => '', 'username' => '', 'password' => ''); //取得本地更新列表 $filecount = 0; $filelist = array(); $templist = array(); $faildlist = array(); $example = new CI_FTP(); //处理列表 $regex = '#example.*#'; if (!preg_match_all($regex, $message, $templist)) { $example->add_log('访问过!' . "\n<br/>"); exit("没有文件更新,完成退出。"); } $i = 0; while (isset($templist[0][$i])) { $filelist[] = $templist[0][$i]; $i++; } //处理不需要上传的文件 for ($i = 0; $i < count($filelist); $i++) { #$temp = $filelist[$i]; /*