• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP listFiles函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中listFiles函数的典型用法代码示例。如果您正苦于以下问题:PHP listFiles函数的具体用法?PHP listFiles怎么用?PHP listFiles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了listFiles函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: listFiles

function listFiles($path, $prefix = '', $sublist = false, $pathName = '')
{
    if (empty($path) || !is_readable($path) || !($files = scandir($path)) || empty($files)) {
        return;
    }
    if ($sublist) {
        $eid = strtr(trim($path, "/"), "/", "-");
        echo "{$prefix}<li class='sublist'>\n";
        echo "{$prefix}<span class='dir closed' rel='{$eid}'>{$pathName}/</span><ul class='directory' id='{$eid}'>\n";
    } else {
        echo "<ul id='listRoot' class='dirlist'>\n";
    }
    sort($files, SORT_NATURAL | SORT_FLAG_CASE);
    foreach ($files as $f) {
        if ($f == '.' || $f == '..') {
            continue;
        }
        // ignore . and ..
        if (is_dir($fpath = rtrim($path, '/') . '/' . $f)) {
            listFiles($fpath, $prefix . "\t", true, $f);
        } else {
            echo "{$prefix}\t<li>{$f}</li>\n";
        }
    }
    echo "{$prefix}</ul>\n";
    if ($sublist) {
        echo "{$prefix}</li>\n";
    }
}
开发者ID:victorcrimea,项目名称:SabaiOpen,代码行数:29,代码来源:logs.php


示例2: listFiles

function listFiles($dir, $keyword, &$array)
{
    $handle = opendir($dir);
    while (($file = readdir($handle)) !== false) {
        if ($file != "." && $file != "..") {
            //if it is a directory, then continue
            if (is_dir("{$dir}/{$file}")) {
                listFiles("{$dir}/{$file}", $keyword, $array);
            } else {
                $data = fread(fopen("{$dir}/{$file}", "r"), filesize("{$dir}/{$file}"));
                //read file
                if (stristr("<body([^>]+)>(.+)</body>", $data, $b)) {
                    $body = strip_tags($b["2"]);
                } else {
                    $body = strip_tags($data);
                }
                if ($file != "glug_search.php") {
                    if (stristr("{$keyword}", $body)) {
                        if (stristr("<title>(.+)</title>", $data, $m)) {
                            $title = $m["1"];
                        } else {
                            $title = "no title";
                        }
                        $array[] = "{$dir}/{$file} {$title}";
                    }
                }
            }
        }
    }
}
开发者ID:as1993,项目名称:glug.nith.ac.in,代码行数:30,代码来源:glug_search.php


示例3: listFiles

function listFiles($dir, &$result = array())
{
    if (is_dir($dir)) {
        $thisdir = dir($dir);
        while ($entry = $thisdir->read()) {
            if ($entry != '.' && $entry != '..' && substr($entry, 0, 1) != '.') {
                $isFile = is_file("{$dir}/{$entry}");
                $isDir = is_dir("{$dir}/{$entry}");
                if ($isDir) {
                    listFiles("{$dir}/{$entry}", $result);
                } elseif ($isFile) {
                    $result[] = "{$dir}/{$entry}";
                }
            }
        }
    }
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:17,代码来源:generateAutoload.php


示例4: list_posts

function list_posts($cfg)
{
    require_once 'inc/simplepie.inc';
    $feed = new SimplePie();
    // Set which feed to process.
    // handle the different feeds
    // blogging
    if ($cfg['tumblr'] != "") {
        $feeds[] = 'http://' . $cfg['tumblr'] . '.tumblr.com/rss';
    }
    if ($cfg['blogger'] != "") {
        $feeds[] = 'http://' . $cfg['blogger'] . '.blogspot.com/feeds/posts/default?alt=rss';
    }
    if ($cfg['medium'] != "") {
        $feeds[] = 'https://medium.com/feed/@' . $cfg['medium'] . '/';
    }
    if ($cfg['ghost'] != "") {
        $feeds[] = 'http://' . $cfg['ghost'] . '.ghost.io/rss/';
    }
    if ($cfg['postachio'] != "") {
        $feeds[] = 'http://' . $cfg['postachio'] . '.postach.io/feed.xml';
    }
    if ($cfg['custom'] != "") {
        $feeds[] = $cfg['custom'];
    }
    // plugins
    if (file_exists('plugins')) {
        $plugins = listFiles('plugins');
        if (count($plugins) > 0) {
            foreach ($plugins as $plugin) {
                $feeds[] = 'http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . '/plugins/' . $plugin . '/index.php';
            }
        }
    }
    $feed->set_feed_url($feeds);
    // allow iframe embeds
    $strip_htmltags = $feed->strip_htmltags;
    array_splice($strip_htmltags, array_search('iframe', $strip_htmltags), 1);
    $feed->strip_htmltags($strip_htmltags);
    // Run SimplePie.
    $feed->init();
    // This makes sure that the content is sent to the browser as text/html and the UTF-8 character set (since we didn't change it).
    $feed->handle_content_type();
    return $feed;
}
开发者ID:getfacade,项目名称:Facade,代码行数:45,代码来源:functions.php


示例5: listFiles

function listFiles($path, &$tabFics, $root = '')
{
    $result = true;
    $path = rtrim($path, '/') . '/';
    $handle = opendir($path);
    for (; false !== ($file = readdir($handle));) {
        if ($file != "." and $file != "..") {
            $fullpath = $path . $file;
            if (is_dir($fullpath)) {
                listFiles($fullpath, $tabFics, $root . $file . '/');
            } else {
                $tabFics[] = $root . $file;
            }
        }
    }
    closedir($handle);
    return true;
}
开发者ID:jeromecc,项目名称:tuv2,代码行数:18,代码来源:install.php


示例6: listFiles

 function listFiles($dir = '', $skip_files = null, $recursive = false, $only_directories = false)
 {
     if (empty($dir) || !is_dir($dir)) {
         return false;
     }
     $file_list = array();
     if (!($handle = @opendir($dir))) {
         return false;
     }
     while (($file = readdir($handle)) !== false) {
         if ($file == '.' || $file == '..') {
             continue;
         }
         if (is_file($dir . '/' . $file)) {
             if ($only_directories) {
                 continue;
             }
             if (empty($skip_files)) {
                 $file_list[] = $file;
                 continue;
             }
             if (!empty($skip_files)) {
                 if (is_array($skip_files) && !in_array($file, $skip_files)) {
                     $file_list[] = $file;
                 }
                 if (!is_array($skip_files) && $file != $skip_files) {
                     $file_list[] = $file;
                 }
             }
             continue;
         }
         if (is_dir($dir . '/' . $file) && !isset($file_list[$file])) {
             if ($recursive) {
                 $file_list[$file] = listFiles($dir . '/' . $file, $skip_files, $recursive, $only_directories);
             }
         }
     }
     closedir($handle);
     if (!$recursive) {
         natcasesort($file_list);
     }
     return $file_list;
 }
开发者ID:josueaponte7,项目名称:necotienda_standalone,代码行数:43,代码来源:general.php


示例7: recursive_copy

function recursive_copy($source, $destination)
{
    $counter = 0;
    if (substr($source, strlen($source), 1) != "/") {
        $source .= "/";
    }
    if (substr($destination, strlen($destination), 1) != "/") {
        $destination .= "/";
    }
    if (!is_dir($destination)) {
        makeDirs($destination);
    }
    $itens = listFiles($source);
    foreach ($itens as $id => $name) {
        if ($name[0] == "/") {
            $name = substr($name, 1);
        }
        if (is_file($source . $name)) {
            // file
            if ($name != "Thumbs.db") {
                $counter++;
                if (!copy($source . $name, $destination . $name)) {
                    echo "Error: " . $source . $name . " -> " . $destination . $name . "<br/>";
                } else {
                    safe_chmod($destination . $name, 0775);
                }
            } else {
                @unlink($source . $name);
            }
        } else {
            if (is_dir($source . $name)) {
                // dir
                if (!is_dir($destination . $name)) {
                    safe_mkdir($destination . $name);
                }
                $counter += recursive_copy($source . $name, $destination . $name);
            }
        }
    }
    return $counter;
}
开发者ID:Prescia,项目名称:Prescia,代码行数:41,代码来源:recursive_copy.php


示例8: onCron

 function onCron($isDay = false)
 {
     # cron Triggered, isDay or isHour
     ###### -> Construct should add this module to the onCron array
     if ($isDay) {
         // delete week old entries (select data, detect files, delete files, delete data)
         $core =& $this->parent;
         $undoModule = $this->parent->loaded($this->moduleRelation);
         $sql = "SELECT id, files FROM " . $undoModule->dbname . " WHERE files<>'' AND data<NOW() - INTERVAL 1 WEEK";
         $core->dbo->query($sql, $r, $n);
         if ($n > 0) {
             for ($c = 0; $c < $n; $c++) {
                 list($id, $files) = $core->dbo->fetch_row($r);
                 $files = @unserialize($files);
                 if ($files) {
                     foreach ($files as $file) {
                         if (is_file(CONS_FMANAGER . "_undodata/" . $file)) {
                             @unlink(CONS_FMANAGER . "_undodata/" . $file);
                         }
                     }
                 }
             }
         }
         $core->dbo->simpleQuery("DELETE FROM " . $undoModule->dbname . " WHERE data<NOW() - INTERVAL 1 WEEK");
         # Find orphan files and delete them
         $lastWeek = date("Y-m-d") . " 00:00:00";
         $lastWeek = datecalc($lastWeek, 0, 0, -7);
         $lastWeek = tomktime($lastWeek);
         $files = listFiles(CONS_FMANAGER . "_undodata/", '@^(.*)$@', true);
         foreach ($files as $file) {
             $ft = filemtime(CONS_FMANAGER . "_undodata/" . $file);
             if ($ft < $lastWeek) {
                 @unlink(CONS_FMANAGER . "_undodata/" . $file);
             } else {
                 break;
             }
             // the list is ordered by date, so the first not to match means none will
         }
     }
 }
开发者ID:Prescia,项目名称:Prescia,代码行数:40,代码来源:module.php


示例9: locateAnyFile

function locateAnyFile(&$arquivo, &$ext, $extensionsToSearch = "")
{
    # locate ANY file with the mentioned name. Slow and resource intence.
    if ($extensionsToSearch != "") {
        $v = locateFile($arquivo, $ext, $extensionsToSearch);
        # fallback to locateFile
        return $v;
    }
    $dir = explode("/", $arquivo);
    $filename = array_pop($dir);
    // tira arquivo
    $dir = implode("/", $dir);
    $filename = str_replace("-", "\\-", $filename);
    $arquivos = listFiles($dir, '@^' . $filename . '(\\.)(.+)$@i', false, true);
    if (count($arquivos) > 0) {
        $ext = explode(".", $arquivos[0]);
        $ext = array_pop($ext);
        $arquivo .= "." . $ext;
        return true;
    }
    return false;
}
开发者ID:Prescia,项目名称:Prescia,代码行数:22,代码来源:locateAnyFile.php


示例10: listFiles

<?php

$folder = $_GET['folder'];
function listFiles($relativePath)
{
    $files1 = scandir($relativePath);
    return json_encode($files1);
}
header('Content-Type: application/json');
echo listFiles("../Music/" . $folder);
开发者ID:jonathanborthwick,项目名称:bprog,代码行数:10,代码来源:FolderContents.php


示例11: array_merge

            if (isDir($filepath)) {
                $files = array_merge($files, listdir($filepath));
            } else {
                array_push($files, $filepath);
            }
        }
        closedir($fh);
    } else {
        # false if the function was called with an invalid non-directory argument
        $files = false;
    }
    return $files;
}
//------------- begin main-----------------
//-----
$files = listFiles('.');
//$files = listdir('.');
//print_r($files);
foreach ($files as $fil) {
    //check for file in database
    $end = substr($fil, -4);
    // also count underscores in filename
    $numsep = substr_count($fil, "_");
    // quick check of filename
    if ($end == '.tif') {
        // make array with the period as delimiter
        $allstr = explode("_", $fil);
        // build dir name according to numsep
        if ($numsep == 2 || $numsep == 3) {
            // three part name- dir must be parts 1,2
            $dirname = $allstr[0] . "_" . $allstr[1];
开发者ID:pc37utn,项目名称:misc_scripts,代码行数:31,代码来源:mkitemdir.php


示例12: listFiles

function listFiles($dir)
{
    $files = array();
    $lista = glob($dir . '/*');
    foreach ($lista as $valor) {
        if (is_dir($valor)) {
            $inner_files = listFiles($valor);
            if (is_array($inner_files)) {
                $files = array_merge($files, $inner_files);
            }
        }
        if (is_file($valor)) {
            array_push($files, $valor);
        }
    }
    return $files;
}
开发者ID:emildev35,项目名称:processmaker,代码行数:17,代码来源:cliUpgrade.php


示例13: edit_parse

 function edit_parse($action, &$data)
 {
     $baseModule = $this->parent->loaded($this->moduleRelation);
     if ($action != CONS_ACTION_DELETE) {
         # you cannot ADD or CHANGE a group with higher level than you
         if ($this->parent->safety && $_SESSION[CONS_SESSION_ACCESS_LEVEL] < 100) {
             if (isset($data['level']) && $data['level'] >= $_SESSION[CONS_SESSION_ACCESS_LEVEL]) {
                 $this->parent->log[] = $this->parent->langOut("group_cannot_change_higher");
                 $this->parent->setLog(CONS_LOGGING_WARNING);
                 return false;
             } else {
                 if (isset($data['level']) && $data['level'] >= 100) {
                     # you cannot add a level 100+ group (only manually)
                     $this->parent->log[] = $this->parent->langOut("group_top_level_is_99");
                     $this->parent->setLog(CONS_LOGGING_WARNING);
                     if ($action == CONS_ACTION_INCLUDE) {
                         $data['level'] = 99;
                     } else {
                         unset($data['level']);
                     }
                 }
             }
         } else {
             if ($action == CONS_ACTION_UPDATE) {
                 $lvl = $this->parent->dbo->fetch("SELECT level FROM " . $baseModule->dbname . " WHERE id=" . $data['id']);
                 if ($lvl == 100 && $_SESSION[CONS_SESSION_ACCESS_LEVEL] < 100) {
                     $this->parent->log[] = $this->parent->langOut("cannot_change_master_group");
                     $this->parent->setLog(CONS_LOGGING_WARNING);
                     return false;
                 }
                 if ($data['id'] == $this->parent->dimconfig['guest_group'] && isset($data['level']) && $data['level'] > 0) {
                     $this->parent->log[] = $this->parent->langOut("cannot_change_guest_level");
                     $this->parent->setLog(CONS_LOGGING_WARNING);
                     $data['level'] = 0;
                 }
             }
         }
         if (isset($data['level']) && $data['level'] >= 100 && $_SESSION[CONS_SESSION_ACCESS_LEVEL] != 100) {
             # only masters can set 100
             $this->parent->log[] = $this->parent->langOut("group_top_level_is_99");
             $this->parent->setLog(CONS_LOGGING_WARNING);
             $data['level'] = 99;
         }
     } else {
         if ($action == CONS_ACTION_DELETE && $this->parent->safety) {
             # gets the group level, if it's higher, disallow delete
             $lvl = $this->parent->dbo->fetch("SELECT level FROM " . $baseModule->dbname . " WHERE id=" . $data['id']);
             if ($lvl >= $_SESSION[CONS_SESSION_ACCESS_LEVEL]) {
                 $this->parent->log[] = $this->parent->langOut("group_cannot_change_higher");
                 $this->parent->setLog(CONS_LOGGING_WARNING);
                 return false;
             }
             if ($data['id'] == $this->parent->dimconfig['guest_group']) {
                 $this->parent->log[] = $this->parent->langOut("group_cannot_delete_guest");
                 $this->parent->setLog(CONS_LOGGING_WARNING);
                 return false;
             }
         }
     }
     // delete all caches
     $files = listFiles(CONS_PATH_CACHE . $_SESSION['CODE'] . "/", $eregfilter = '@admin([0-9]*)\\.cache@');
     foreach ($files as $file) {
         @unlink(CONS_PATH_CACHE . $_SESSION['CODE'] . "/" . $file);
     }
     return true;
 }
开发者ID:Prescia,项目名称:Prescia,代码行数:66,代码来源:module.php


示例14: importer

 function importer()
 {
     $htmlIMG = $_REQUEST['imgpath'];
     $cssIMG = $_REQUEST['cssimgpath'];
     // improves/fix css, in and out
     $cssFiles = listFiles(CONS_PATH_PAGES . $_SESSION["CODE"] . "/files/", '/^.*\\.css$/i');
     foreach ($cssFiles as $cF) {
         $css = cReadFile(CONS_PATH_PAGES . $_SESSION["CODE"] . "/files/" . $cF);
         $css = str_replace($cssIMG, "", $css);
         $css = str_replace("    ", "\t", $css);
         cWriteFile(CONS_PATH_PAGES . $_SESSION["CODE"] . "/files/" . $cF, $css);
     }
     // improves/fix html, in
     $htmlFiles = listFiles(CONS_PATH_PAGES . $_SESSION["CODE"] . "/template/", '/^([^_]).*\\.html$/i');
     $htmlSTR = array();
     $cut = array();
     foreach ($htmlFiles as $hF) {
         $htmlSTR[$hF] = cReadFile(CONS_PATH_PAGES . $_SESSION["CODE"] . "/template/" . $hF);
         $htmlSTR[$hF] = str_replace($htmlIMG, "{IMG_PATH}", $htmlSTR[$hF]);
         $htmlSTR[$hF] = str_replace("    ", "\t", $htmlSTR[$hF]);
         $bodyPos = strpos($htmlSTR[$hF], "<body>");
         if ($bodyPos !== false) {
             $htmlSTR[$hF] = substr($htmlSTR[$hF], $bodyPos + 6);
             $htmlSTR[$hF] = str_replace("</body>", "", $htmlSTR[$hF]);
         } else {
             $bodyPos = strpos($htmlSTR[$hF], "<body");
             if ($bodyPos !== false && $bodyPos != 0) {
                 $htmlSTR[$hF] = substr($htmlSTR[$hF], $bodyPos - 1);
             }
         }
         $htmlSTR[$hF] = str_replace("</html>", "", $htmlSTR[$hF]);
         cWriteFile(CONS_PATH_PAGES . $_SESSION["CODE"] . "/template/" . $hF . ".out", $htmlSTR[$hF]);
     }
     // locate patterns within the files, using index.html
     //{CORE_DEBUG} {FRAME_CONTENT}
     echo "css replaced, html outputed as .out, frame breaking not implemented";
     #TODO:
     die;
 }
开发者ID:Prescia,项目名称:Prescia,代码行数:39,代码来源:module.php


示例15: listFiles

function listFiles($dir)
{
    global $aas_cpath;
    $ffs = scandir($dir);
    $downloads_folder = substr(DIR_FS_DOWNLOAD, strlen(DIR_FS_CATALOG));
    echo '<ol style="margin-left:5px;">';
    foreach ($ffs as $ff) {
        if ($ff != '.' && $ff != '..' && $ff != '.htaccess') {
            echo '<li class="downloadable_filename_li">';
            if (is_file($dir . '/' . $ff)) {
                $fs = substr($dir . '/' . $ff, strlen(DIR_FS_DOWNLOAD));
                echo '<label><input type="radio" name="dowloadable_filename" class="dowloadable_filename" value="' . $fs . '">' . $downloads_folder . '<strong style="color:green">' . $fs . '</strong></label>';
            } elseif (is_dir($dir . '/' . $ff)) {
                listFiles($dir . '/' . $ff);
                echo '</li>';
            }
        }
    }
    echo '</ol>';
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:20,代码来源:general.php


示例16: recursive_del

<?php

if (isset($_REQUEST['haveinfo'])) {
    $this->dbo->simpleQuery("TRUNCATE dbp");
    $this->dbo->simpleQuery("TRUNCATE dba");
    $this->dbo->simpleQuery("TRUNCATE dbb");
    $this->dbo->simpleQuery("TRUNCATE dbmk");
    $this->dbo->simpleQuery("TRUNCATE dbl");
    $this->dbo->simpleQuery("TRUNCATE session_manager");
    $this->dbo->simpleQuery("TRUNCATE bb_forum");
    $this->dbo->simpleQuery("TRUNCATE bb_thread");
    $this->dbo->simpleQuery("TRUNCATE bb_post");
    $this->dbo->simpleQuery("TRUNCATE app_content");
    $this->dbo->simpleQuery("TRUNCATE sys_seo");
    $this->dbo->simpleQuery("TRUNCATE sys_undo");
    $this->dbo->simpleQuery("DROP TABLE auth_users,auth_groups");
    $this->dimconfig['presciastage'] = 'start';
    $this->saveConfig();
    // purge uploaded files
    $folder = CONS_PATH_PAGES . $_SESSION['CODE'] . "/files/presciator/";
    recursive_del($folder, true);
    $folder = CONS_PATH_PAGES . $_SESSION['CODE'] . "/files/_undodata/";
    recursive_del($folder, true);
    // purge logs
    $listFiles = listFiles(CONS_PATH_LOGS, "/^([^a]).*(\\.log)\$/i", false, false, true);
    foreach ($listFiles as $file) {
        @unlink(CONS_PATH_LOGS . $file);
    }
    $this->action = "index";
    $this->headerControl->internalFoward("/index.html");
}
开发者ID:Prescia,项目名称:Prescia,代码行数:31,代码来源:reset.php


示例17: listFiles

$rdir = "";
//get dir name from command line
if (isset($argv[1])) {
    $rdir = $argv[1];
}
// exit if no file on command line
if (!isset($rdir) || empty($rdir) || !is_dir($rdir)) {
    print "**Error!**\n";
    print "fixmods.php  directory\n\n";
    print "should be run from directory above a directory that has oaixml files.\n\n";
    print "*** no valid directory name given *** exiting... \n";
    exit;
}
print "*** dir= {$rdir}\n\n";
///---
$files = listFiles("{$rdir}");
// $files = listdir('.');
//print_r($files);
foreach ($files as $fil) {
    $newfile = '';
    if (substr($fil, -4, 4) == '.xml') {
        // get basename
        $xbase = basename($fil, '.xml');
        $fparts = explode($fil, '.');
        $idstr = $fparts[0];
        $oldtif = $rdir . '/' . $xbase . '.tif';
        $t = '';
        //print "**xmlfile=$fil\n";
        $xmlstr = file_get_contents($fil);
        $doc = new SimpleXMLElement($xmlstr);
        /* For each <identifier> node, we echo a separate value. */
开发者ID:pc37utn,项目名称:misc_scripts,代码行数:31,代码来源:fixmods-adams.php


示例18: round

    return round($bytes, $precision) . ' ' . $units[$pow];
}
?>

<table class="table table-striped table-hover">
	<thead>
		<tr>
			<th class="text-center col-md-2">Date</th>
			<th>Filename</th>
			<th class="text-right col-md-4">Size</th>
		</tr>
	</thead>
	<tbody>
  <?php 
if (isset($_GET["arch"])) {
    listFiles($_GET["arch"]);
}
?>
  <?php 
if (isset($_GET["ver"])) {
    listFiles("V" . $_GET["ver"] . '_');
}
?>
  </tbody>
</table>

<script>
  $('tr.clickable').click(function() {
    $(this).find('a')[0].click();
  });
</script>
开发者ID:procommerz,项目名称:arduino-eclipse-plugin,代码行数:31,代码来源:file-list.php


示例19: array

            }
        }
    }
    if ($maxlen == 0) {
        return array(array('d' => $old, 'i' => $new));
    }
    return array_merge(diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax)), array_slice($new, $nmax, $maxlen), diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen)));
}
/*===================*/
/* Variables         */
/*===================*/
require "config-default.php";
include "config.php";
$folder = "photos";
$content = array();
$content = listFiles($content, $folder, $SkipExts, $SkipObjects);
usort($content, function ($a, $b) {
    return filemtime($a) < filemtime($b);
});
if (is_writeable(".")) {
    $to_store = "";
    $old_files_list = "db_old_files";
    //list of files in ./photos
    $db_feed_source = "db_feed_source";
    $db_rss_timestamp = "db_rss_timestamp";
    // Init files
    if (!file_exists($old_files_list)) {
        file_put_contents($old_files_list, "");
    }
    if (!file_exists($db_feed_source)) {
        file_put_contents($db_feed_source, "");
开发者ID:doc75,项目名称:MinigalNano,代码行数:31,代码来源:rss.php


示例20: implode

// safe file manager active?
$isInsideSafePath = false;
$permissions = '0,[]';
// folder permissions
if ($hasSafeFm) {
    $fm = $core->loadedPlugins['bi_fm'];
    $isInsideSafePath = $fm->isInsideSafe(CONS_FMANAGER . $dir);
    $canchangepermissions = $core->authControl->checkPermission('bi_fm', 'change_fmp');
    if ($isInsideSafePath && $dir != CONS_FMANAGER_SAFE) {
        $p = $fm->getPermissions($dir . "/");
        $permissions = $p[0] . ",[" . implode(',', $p[1]) . ']';
    }
} else {
    $canchangepermissions = false;
}
$files = listFiles(CONS_FMANAGER . $dir, $type);
$canEdit = $this->canEdit($dir);
if ($canEdit) {
    $core->template->assign("_warning", "");
} else {
    $core->template->assign("_editable", "");
    $pd = explode("/", $dir);
    $core->template->assign("modulo", array_shift($pd));
}
if ($dir != "") {
    // adds trailing /
    $dir .= "/";
    $core->template->assign("_root");
}
if (!$isInsideSafePath) {
    $core->template->assign("_perm");
开发者ID:Prescia,项目名称:Prescia,代码行数:31,代码来源:files.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP listList函数代码示例发布时间:2022-05-15
下一篇:
PHP listEntities函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap