当前位置: 首页>>代码示例>>PHP>>正文


PHP FileList::EscludeFiles方法代码示例

本文整理汇总了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 />&nbsp;<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);
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:update.php

示例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']);
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:UpdateIanseo.php


注:本文中的FileList::EscludeFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。