本文整理汇总了PHP中FileList::EscludeFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP FileList::EscludeFiles方法的具体用法?PHP FileList::EscludeFiles怎么用?PHP FileList::EscludeFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileList
的用法示例。
在下文中一共展示了FileList::EscludeFiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: File
}
// collezione di Files
$Files = $xmlDoc->getElementsByTagName('File');
for ($i = 0; $i < $Files->length; $i++) {
$f = $Files->item($i);
$name = $f->getElementsByTagName('Name')->item(0)->textContent;
$size = $f->getElementsByTagName('Size')->item(0)->textContent;
$md5 = $f->getElementsByTagName('MD5')->item(0)->textContent;
// echo $name . " (" . $size . ")<br>";
$rFileList[] = new File($name, $size, $md5);
}
}
if (count($rFileList) > 0) {
//Gestisci Elenco Locale
$tmp = new FileList("/");
$tmp->EscludeFiles('^[.]');
$tmp->Load();
$lFileList = $tmp->toArray();
//Calcola Le differenze DA SCARICARE
$NeedFile = array_udiff($rFileList, $lFileList, array("File", "compare"));
echo "<br /> <br />Aggiornamento Files \n";
echo "<pre>";
foreach ($NeedFile as $value) {
$tmp = file_get_contents("http://" . $_REQUEST["Address"] . "/Install/Download.php?FileName=" . urlencode($value->Name) . "&FileSize=" . urlencode($value->Size));
if ($tmp !== false) {
$tmp = gzuncompress($tmp);
if ($value->MD5 == md5($tmp)) {
if (!is_dir(dirname($CFG->INCLUDE_PATH . $value->Name))) {
mkdir(dirname($CFG->INCLUDE_PATH . $value->Name), 0775, true);
}
file_put_contents($CFG->INCLUDE_PATH . $value->Name, $tmp);
示例2: str_repeat
require_once 'Language/lib.php';
include 'Common/Templates/head.php';
// nothing to do here without data
if (!in_array(ProgramRelease, array('STABLE', 'FITARCO')) and empty($_POST['Email'])) {
CD_redirect('/');
}
$URL = 'http://www.ianseo.net/Update.php';
//$URL='http://ianseonet.dellinux/Update.php';
include 'FileList.php';
@ob_end_flush();
echo str_repeat(' ', 1500);
flush();
// preparing list
do_flush('<div><br/>' . get_text('Prepare', 'Install') . ':... ');
$tmp = new FileList($CFG->INCLUDE_PATH);
$tmp->EscludeFiles('^(\\.)');
$tmp->ShowSize(true);
$tmp->ShowMD5(true);
if (!$tmp->Load()) {
echo '</div><div><br/>' . get_text('NotUpdatable', 'Install', $CFG->INCLUDE_PATH) . '</div>';
include 'Common/Templates/tail.php';
die;
}
do_flush(get_text('Done', 'Install') . '</div>');
// sending request to ianseo
do_flush('<div><br/>' . get_text('Sending', 'Install') . ':... ');
$Old = $tmp->serialize();
$Query = array('Json' => gzcompress($Old));
if (!empty($_POST['Email'])) {
$Query['Email'] = trim($_POST['Email']);
}