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


PHP getDirList函数代码示例

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


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

示例1: getDirList

function getDirList($dirName)
{
    global $directory_array, $sub_dir_files;
    // add directory name to the sub_dir_files list;
    $sub_dir_files[] = $dirName;
    $d = @dir($dirName);
    $file_extension = '.php';
    if ($d) {
        while ($entry = $d->read()) {
            if ($entry != "." && $entry != "..") {
                if (is_dir($dirName . "/" . $entry)) {
                    if ($entry == 'CVS' || $entry == '.svn') {
                        // skip
                    } else {
                        getDirList($dirName . "/" . $entry);
                    }
                } else {
                    if (substr($entry, strrpos($entry, '.')) == $file_extension) {
                        //echo 'I AM HERE 2 ' . $dirName."/".$entry . '<br>';
                        //            $directory_array[] .= $dirName."/".$entry;
                    } else {
                        //echo 'I AM HERE 3 ' . $dirName."/".$entry . '<br>';
                    }
                }
            }
        }
        $d->close();
    }
    return $sub_dir_files;
}
开发者ID:happyxlq,项目名称:lt_svn,代码行数:30,代码来源:developers_tool_kit.php

示例2: getDirList

function getDirList($dirName, $filetypes = 1)
{
    global $directory_array, $sub_dir_files;
    // add directory name to the sub_dir_files list;
    $sub_dir_files[] = $dirName;
    $d = @dir($dirName);
    $file_extension = '.php';
    if ($d) {
        while ($entry = $d->read()) {
            if ($entry != "." && $entry != "..") {
                if (is_dir($dirName . "/" . $entry)) {
                    if ($entry == 'CVS') {
                        // skip
                    } else {
                        getDirList($dirName . "/" . $entry);
                    }
                } else {
                    if (preg_match('/\\' . $file_extension . '$/', $entry) > 0) {
                        //echo 'I AM HERE 2 ' . $dirName."/".$entry . '<br>';
                        //            $directory_array[] .= $dirName."/".$entry;
                    } else {
                        //echo 'I AM HERE 3 ' . $dirName."/".$entry . '<br>';
                    }
                }
            }
        }
        $d->close();
        unset($d);
    }
    return $sub_dir_files;
}
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:developers_tool_kit.php

示例3: getDirList

function getDirList($dirName)
{
    global $i;
    $d = dir($dirName);
    while ($entry = $d->read()) {
        if ($entry != "." && $entry != "..") {
            if (is_dir($dirName . "/" . $entry)) {
                getDirList($dirName . "/" . $entry);
            } elseif (substr($entry, -9) == '.lang.php') {
                include $dirName . "/" . $entry;
                if (isset($mod_strings)) {
                    update_override($dirName . '/' . $entry, $mod_strings, 'mod_strings');
                }
            }
        }
    }
    $d->close();
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:18,代码来源:language_upgrade.php

示例4: printTorrents

function printTorrents()
{
    echo "\n";
    echo "----------------------------------------\n";
    echo "          TorrentFlux-Torrents          \n";
    echo "----------------------------------------\n";
    echo "\n";
    global $cfg;
    $torrents = getTorrentListFromFS();
    foreach ($torrents as $torrent) {
        echo ' - ' . $torrent;
        if (isTorrentRunning($torrent)) {
            echo " (running)";
        }
        echo "\n";
    }
    echo "\n";
    define("_DOWNLOADSPEED", "Download Speed");
    define("_UPLOADSPEED", "Upload Speed");
    $dirList = @getDirList($cfg["torrent_file_path"]);
    if (!array_key_exists("total_download", $cfg)) {
        $cfg["total_download"] = 0;
    }
    if (!array_key_exists("total_upload", $cfg)) {
        $cfg["total_upload"] = 0;
    }
    $sumMaxUpRate = getSumMaxUpRate();
    $sumMaxDownRate = getSumMaxDownRate();
    $sumMaxRate = $sumMaxUpRate + $sumMaxDownRate;
    echo _DOWNLOADSPEED . "\t" . ': ' . number_format($cfg["total_download"], 2) . ' (' . number_format($sumMaxDownRate, 2) . ') kB/s' . "\n";
    echo _UPLOADSPEED . "\t" . ': ' . number_format($cfg["total_upload"], 2) . ' (' . number_format($sumMaxUpRate, 2) . ') kB/s' . "\n";
    echo _TOTALSPEED . "\t" . ': ' . number_format($cfg["total_download"] + $cfg["total_upload"], 2) . ' (' . number_format($sumMaxRate, 2) . ') kB/s' . "\n";
    echo _ID_CONNECTIONS . "\t" . ': ' . netstatConnectionsSum() . ' (' . getSumMaxCons() . ')' . "\n";
    echo "\n";
}
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:35,代码来源:fluxcli.php

示例5: getModuleNameList

function getModuleNameList()
{
    $ignoreList = array("Common", "Runtime", "TPH");
    $allFileList = getDirList(APP_PATH);
    return array_diff($allFileList, $ignoreList);
}
开发者ID:zhuanqianfish,项目名称:ThinkphpHelper,代码行数:6,代码来源:function.php

示例6: getRequestVar

     $min = getRequestVar('min');
     if (empty($min)) {
         $min = 0;
     }
     $user_id = getRequestVar('user_id');
     $srchFile = getRequestVar('srchFile');
     $srchAction = getRequestVar('srchAction');
     showUserActivity($min, $user_id, $srchFile, $srchAction);
     break;
     //XFER
 //XFER
 case "xfer":
     DisplayHead(_XFER);
     displayMenu();
     if ($cfg['enable_xfer'] == 1) {
         getDirList($cfg["torrent_file_path"], 0);
         displayXfer();
     }
     DisplayFoot(true, true);
     break;
 case "backupDatabase":
     backupDatabase();
     break;
 case "editRSS":
     editRSS();
     break;
 case "addRSS":
     $newRSS = getRequestVar('newRSS');
     addRSS($newRSS);
     break;
 case "deleteRSS":
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:admin.php

示例7: die

 * @author      Haruki Setoyama  <haruki@planewave.org>
 * @author      Kazumi Ono <webmaster@myweb.ne.jp>
 * @author      Skalpa Keo <skalpa@xoops.org>
 * @author      Taiwen Jiang <phppp@users.sourceforge.net>
 * @author      DuGris <dugris@frxoops.org>
 * @author      DuGris (aka L. JEN) <dugris@frxoops.org>
 * @version     $Id: page_langselect.php 2822 2009-02-20 08:50:48Z phppp $
**/
require_once './include/common.inc.php';
if (!defined('XOOPS_INSTALL')) {
    die('XOOPS Installation wizard die');
}
setcookie('xo_install_lang', 'english', null, null, null);
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_REQUEST['lang'])) {
    $lang = $_REQUEST['lang'];
    setcookie('xo_install_lang', $lang, null, null, null);
    $wizard->redirectToPage('+1');
    exit;
}
$_SESSION['settings'] = array();
setcookie('xo_install_user', '', null, null, null);
$pageHasForm = true;
$title = LANGUAGE_SELECTION;
$content = '<select name="lang" size="10" style="min-width: 10em">';
$languages = getDirList("./language/");
foreach ($languages as $lang) {
    $sel = $lang == $wizard->language ? ' selected="selected"' : '';
    $content .= "<option value=\"{$lang}\"{$sel}>{$lang}</option>\n";
}
$content .= "</select>";
include './include/install_tpl.php';
开发者ID:yunsite,项目名称:xoopsdc,代码行数:31,代码来源:page_langselect.php

示例8: getDirList

}
function getDirList()
{
    $output = trim(shell_exec("ls -rs /data/doxygen | grep CMSSW | awk -F \" \" '{print \$2}'"));
    $arr = explode("\n", $output);
    foreach ($arr as $file) {
        if (strpos($file, "CMSSW") === 0) {
            $version = explode("_", $file);
            $version_list[$version[1]][$version[2]][$version[3]][] = $file;
        }
    }
    return $version_list;
}
$BASE = "http://cmssdt.cern.ch/SDT/doxygen/";
//$level1 = getDirectoryList("/data/sdt/SDT/doxygen");
$level1 = getDirList();
krsort($level1);
while (list($key1, $level2) = each($level1)) {
    krsort($level2);
    while (list($key2, $level3) = each($level2)) {
        krsort($level3);
        echo "<hr><div class=\"roundbox\"><b>CMSSW_" . $key1 . "_" . $key2 . "_* </b></div>";
        while (list($key3, $values) = each($level3)) {
            echo "<div class=\"tabs\" style=\"margin-left:150px; width:auto\"><ul class=\"tablist\" style=\"margin:0px;\">";
            sort($values);
            while (list($key, $value) = each($values)) {
                echo "<li><a target=\"_blank\" href=" . $BASE . $value . "/doc/html>" . $value . "</a></li> ";
            }
            echo "</ul></div>";
        }
    }
开发者ID:nsahoo,项目名称:cmssw-1,代码行数:31,代码来源:index.php

示例9: elseif

    $op = $_POST['op'];
} elseif (!empty($_GET['op'])) {
    $op = $_GET['op'];
} else {
    $op = '';
}
///// main
switch ($op) {
    default:
    case "langselect":
        $title = _INSTALL_L0;
        if (!defined('_INSTALL_L128')) {
            define('_INSTALL_L128', 'Choose language to be used for the installation process');
        }
        $content = "<p>" . _INSTALL_L128 . "</p>" . "<select name='lang'>";
        $langarr = getDirList("./language/");
        foreach ($langarr as $lang) {
            $content .= "<option value='" . $lang . "'";
            if (strtolower($lang) == $language) {
                $content .= ' selected="selected"';
            }
            $content .= ">" . $lang . "</option>";
        }
        $content .= "</select>";
        $b_next = array('start', _INSTALL_L80);
        include 'install_tpl.php';
        break;
    case "start":
        $title = _INSTALL_L0;
        $content = "<table width='80%' align='center'><tr><td align='left'>\n";
        include './language/' . $language . '/welcome.php';
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:index.php

示例10: buildBinary

function buildBinary($app, $crypt, $clearMz, $randBin)
{
    $platforms = @explode(',', $GLOBALS['config'][$app . '_platforms']);
    if (!is_array($platforms) || count($platforms) == 0) {
        fatalError('Platforms not defined.');
    }
    $r = 0;
    foreach ($platforms as $pf) {
        $pf = strtolower(trim($pf));
        if (!isset($GLOBALS['commandLineOptions'][$app][$pf])) {
            fatalError('Platform "' . $pf . '" not supported.');
        }
        $opts = $GLOBALS['commandLineOptions'][$app][$pf];
        $dirTmp = $GLOBALS['dir']['temp'] . '\\' . $app . '\\' . $pf;
        $dirOutput = $GLOBALS['dir']['output'][$app];
        $dirSource = $GLOBALS['dir']['source'][$app];
        //Сборка PHP.
        if ($pf == 'php') {
            createSubDir($dirTmp);
            $dirSource .= '[php]';
            $dirOutput .= '[php]';
            $list = getDirList($dirSource, $opts['include_files'], false);
            if (count($list) == 0) {
                fatalError('Failed to find source files.');
            }
            foreach ($list as $f) {
                if (!fileInList($opts['exclude_files'], $f = substr($f, strlen($dirSource) + 1))) {
                    $allowPP = !fileInList($opts['exclude_pp_files'], $f);
                    $fileSource = $dirSource . '\\' . $f;
                    $fileOutput = $dirOutput . '\\' . $f;
                    createSubDir(dirname($fileOutput));
                    if (fileInList($opts['php_files'], $f)) {
                        $fileTmp = $dirTmp . '\\' . basename($f);
                        evalPhpTemplate($fileSource, $fileTmp);
                        if ($allowPP && $crypt > 0 && filesize($fileTmp) > 0) {
                            writeLn("......encrypting - {$fileTmp} => {$fileOutput}");
                            passthru(replaceVarables(array('%OUTPUT%' => $fileOutput, '%SOURCE%' => $fileTmp), $GLOBALS['commandLine']['protect']['php']), $r);
                            if ($r != 0) {
                                die(1);
                            }
                        } else {
                            copyFile($fileTmp, $fileOutput);
                        }
                    } else {
                        copyFile($fileSource, $fileOutput);
                    }
                }
            }
        } else {
            createSubDir($dirTmp);
            createSubDir($dirOutput);
            $listCpp = array('*.cpp', '*.c');
            $listRc = array('*.rc');
            $listObj = array('*.obj', '*.res', '*.o');
            //Сборка objects.
            writeLn('[' . $pf . "] Compiling...\r\n");
            $list = getDirList($dirSource, $listCpp, true);
            if (count($list) == 0) {
                fatalError('Failed to find source files.');
            }
            if (!isset($opts['cpp_options'])) {
                fatalError('cpp_options no defined.');
            }
            passthru(replaceVarables(array('%TEMP%' => $dirTmp, '%OPTIONS%' => $opts['cpp_options'], '%SOURCE%' => implode(' ', $list)), $GLOBALS['commandLine']['cpp'][$pf]), $r);
            if ($r != 0) {
                die(1);
            }
            writeLn('');
            //Сборка ресурсов.
            $list = getDirList($dirSource, $listRc, false);
            if (count($list) != 0) {
                foreach ($list as $k => $v) {
                    if (!isset($opts['res_options'])) {
                        fatalError('res_options no defined.');
                    }
                    passthru(replaceVarables(array('%OUTPUT%' => $dirTmp . '\\' . $k . '.res', '%OPTIONS%' => $opts['res_options'], '%SOURCE%' => $v), $GLOBALS['commandLine']['res'][$pf]), $r);
                    if ($r != 0) {
                        die(1);
                    }
                    writeLn('');
                }
            }
            //Сборка bin
            writeLn('[' . $pf . "] Linking...\r\n");
            $list = getDirList($dirTmp, $listObj, true);
            if (count($list) == 0) {
                fatalError('Failed to find object files.');
            }
            if ($randBin) {
                shuffle($list);
            }
            if (!isset($opts['lnk_options'])) {
                fatalError('cpp_options no defined.');
            }
            $fileBin = $dirOutput . '\\' . $opts['name'];
            $fileMap = $dirTmp . '\\' . $app . '.map';
            $fileDef = $dirSource . '\\' . $app . '.def';
            passthru(replaceVarables(array('%TEMP%' => $dirTmp, '%OPTIONS%' => (file_exists($fileDef) ? "/DEF:\"{$fileDef}\" " : "") . $opts['lnk_options'], '%MAPFILE%' => $fileMap, '%OUTPUT%' => $fileBin, '%SUBSYS%' => $opts['subsys'], '%SOURCE%' => implode(' ', $list)), $GLOBALS['commandLine']['link'][$pf]), $r);
            if ($r != 0) {
                die(1);
//.........这里部分代码省略.........
开发者ID:sucof,项目名称:footlocker,代码行数:101,代码来源:tools.inc.php

示例11: DisplayHead

/*************************************************************
*  TorrentFlux xfer Statistics hack
*  blackwidow - matt@mattjanssen.net
**************************************************************/
/*
    TorrentFlux xfer Statistics hack is free code; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
*/
include_once 'config.php';
include_once 'functions.php';
DisplayHead(_XFER);
if ($cfg['enable_xfer'] == 1) {
    $cfg['xfer_realtime'] = 1;
    getDirList($cfg['torrent_file_path']);
    echo '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>';
    if ($cfg['xfer_day']) {
        echo displayXferBar($cfg['xfer_day'], $xfer_total['day']['total'], _XFERTHRU . ' Today:');
    }
    if ($cfg['xfer_week']) {
        echo displayXferBar($cfg['xfer_week'], $xfer_total['week']['total'], _XFERTHRU . ' ' . $cfg['week_start'] . ':');
    }
    $monthStart = strtotime(date('Y-m-') . $cfg['month_start']);
    $monthText = date('j') < $cfg['month_start'] ? date('M�j', strtotime('-1 Day', $monthStart)) : date('M�j', strtotime('+1 Month -1 Day', $monthStart));
    if ($cfg['xfer_month']) {
        echo displayXferBar($cfg['xfer_month'], $xfer_total['month']['total'], _XFERTHRU . ' ' . $monthText . ':');
    }
    if ($cfg['xfer_total']) {
        echo displayXferBar($cfg['xfer_total'], $xfer_total['total']['total'], _TOTALXFER . ':');
    }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:xfer.php

示例12: or

 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.

 To read the license please visit http://www.gnu.org/copyleft/gpl.html

*******************************************************************************/
if (!isset($_SESSION['user'])) {
    header('location: login.php');
    exit;
}
// =============================================================================
$transferList = getDirList($cfg["torrent_file_path"]);
// =============================================================================
// OUTPUT
// =============================================================================
?>
<html>
<head>
	<title><?php 
echo $cfg["pagetitle"];
?>
</title>
	<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
	<LINK REL="StyleSheet" HREF="themes/<?php 
echo $cfg["theme"];
?>
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:inc.index.head.tf.php

示例13: _setView

<?php

// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['template']);
$arr = getDirList(ROOT_PATH . "/templates/home");
abr("templates", $arr);
$template = $meta["template"];
abr("template", $template);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
开发者ID:yunsite,项目名称:demila,代码行数:18,代码来源:template.php

示例14: dirlist

function dirlist($dir)
{
    getDirList($dir);
}
开发者ID:npucc,项目名称:onyoku,代码行数:4,代码来源:note.php

示例15: htmlpath

echo $htmlpath;
?>
</td>
                      <td><b>
                        <?php 
echo $command;
?>
                      </b></td>
                    </tr>
					<tr align="left">
					   <td colspan="2"  height="1"></td>
					</tr>
					<?php 
if (is_dir("../admin/purgedtickets/attachments")) {
    $htmlpath = htmlpath("../admin/purgedtickets/attachments");
    $wr = getDirList("../admin/purgedtickets/attachments", 0);
    if ($wr == TEXT_WRITE_PERMISSION_AVAILABLE) {
        $style = "listingmaintext";
        $command = TEXT_NO_ACTION;
        $num++;
    } else {
        $style = "redlistingmaintext";
        $command = TEXT_ENABLE_WRITE_PERMISSION;
    }
} else {
    $command = "";
    $style = "redlistingmaintext";
    $htmlpath = "yourinstalldirectory/admin/purgedtickets/attachments missing";
}
?>
						<tr class="<?php 
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:index.php


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