本文整理匯總了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']);
}