*/ $example_filesRegx = '#p.*#'; if (preg_match($example_filesRegx, $filelist[$i])) { unset($filelist[$i]); } } //将处理好的文件列表备份。 for ($b = 0; $b < count($filelist); $b++) { $example->add_log($filelist[$b] . "\n", 'backuplist.config'); } $filecount = count($filelist); echo "<br/>filecount:" . $filecount . "<br/>"; //处理列表惟一标识 //连接到远程服务器,同步列表 # $example = new CI_FTP(); if (!$example->connect($config)) { die("connecting faild!"); } else { echo "连接成功,请等待...<br/>"; echo "主机名:www.example.com<br/>"; //切换到远程项目目录. if (!$example->changedir('public_html/example')) { } // exit("ERROR: can not chang to $example->hostname example directory!"); //example , exampleadmin 目录检查 //$list = $example->list_files(); //var_dump($list); //本地文件检查 //$localfilepath = '../example'; for ($i = 0; $i < count($filelist); $i++) { if (!file_exists('../example/' . $filelist[$i])) {