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

PHP getDirList函数代码示例

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

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



在下文中一共展示了getDirList函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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  <[email protected]>
 * @author      Kazumi Ono <[email protected]>
 * @author      Skalpa Keo <[email protected]>
 * @author      Taiwen Jiang <[email protected]>
 * @author      DuGris <[email protected]>
 * @author      DuGris (aka L. JEN) <[email protected]>
 * @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 - [email protected]
**************************************************************/
/*
    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 [email protected]
// +----------------------------------------------------------------------
_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


示例16: htmlpath

								 <td width="26%" ><?php 
echo htmlpath("./purgedtickets");
?>
</td>
								 <td width="27%" ><?php 
echo $current;
?>
</td>
								 <td width="25%" ><?php 
echo $recom;
?>
</td>							 
							   </tr>	
   							   <tr class="listingmaintext">
							    <?php 
$wr = getDirList("./purgedtickets/attachments");
if ($wr == TEXT_WRITE_PERMISSION_AVAILABLE) {
    $current = $wr;
    $recom = "&nbsp;";
} else {
    $current = TEXT_WRITE_PERMISSION_UNAVAILABLE;
    $recom = $wr;
}
?>
							     <td width="22%" ><?php 
echo TEXT_PURGED_ATTACHMENTS;
?>
</td>
								 <td width="26%" ><?php 
echo htmlpath("./purgedtickets/attachments");
?>
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:uploadtest.php


示例17: array

 * @author      Skalpa Keo <[email protected]>
 * @author      Taiwen Jiang <[email protected]>
 * @author      DuGris <[email protected]>
 * @author      DuGris (aka L. JEN) <[email protected]>
 * @version     $Id$
 */
require_once __DIR__ . '/include/common.inc.php';
/* @var $wizard XoopsInstallWizard */
$wizard = $_SESSION['wizard'];
$_SESSION['settings'] = array();
setcookie('xo_install_lang', 'en_US', 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);
//$title = LANGUAGE_SELECTION;
$content = '<div class="languages">';
$languages = getDirList("./locale/");
foreach ($languages as $lang) {
    $sel = $lang == $wizard->language ? ' checked="checked"' : '';
    $content .= "<label><input type=\"radio\" name=\"lang\" value=\"{$lang}\"{$sel} />{$lang}</label>\n";
}
$content .= "</div>";
$_SESSION['pageHasHelp'] = false;
$_SESSION['pageHasForm'] = true;
$_SESSION['content'] = $content;
include XOOPS_INSTALL_PATH . '/include/install_tpl.php';
开发者ID:redmexico,项目名称:XoopsCore,代码行数:31,代码来源:page_langselect.php


示例18: define

<?php

/**
 *
 * @package Legacy
 * @version $Id: install_langselect.inc.php,v 1.3 2008/09/25 15:12:33 kilica Exp $
 * @copyright Copyright 2005-2007 XOOPS Cube Project  <https://github.com/xoopscube/legacy>
 * @license https://github.com/xoopscube/legacy/blob/master/docs/GPL_V2.txt GNU GENERAL PUBLIC LICENSE Version 2
 *
 */
if (!defined('_INSTALL_L128')) {
    define('_INSTALL_L128', 'Choose language to be used for the installation process');
}
$langarr = getDirList('./language/');
$php54 = version_compare(PHP_VERSION, '5.4.0') >= 0;
foreach ($langarr as $lang) {
    if ($php54 && $lang !== 'english' && substr($lang, -5) !== '_utf8') {
        continue;
    }
    $wizard->addArray('languages', $lang);
    if (strtolower($lang) == $language) {
        $wizard->addArray('selected', 'selected="selected"');
    } else {
        $wizard->addArray('selected', '');
    }
}
$wizard->render('install_langselect.tpl.php');
开发者ID:hiro1173,项目名称:legacy,代码行数:27,代码来源:install_langselect.inc.php


示例19: defined

/**
 * Upgrader check version file
 *
 * See the enclosed file license.txt for licensing information.
 * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
 *
 * @copyright   The XOOPS project http://www.xoops.org/
 * @license     http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL)
 * @package     upgrader
 * @since       2.0.13
 * @author      Skalpa Keo <[email protected]>
 * @author      Taiwen Jiang <[email protected]>
 * @version     $Id$
 */
defined('XOOPS_ROOT_PATH') or die;
$dirs = getDirList(".");
$results = array();
$files = array();
$needUpgrade = false;
$_SESSION['xoops_upgrade'] = array();
foreach ($dirs as $dir) {
    if (strpos($dir, "-to-")) {
        $upgrader = (include_once "{$dir}/index.php");
        if (is_object($upgrader)) {
            if (!($results[$dir] = $upgrader->isApplied())) {
                $_SESSION['xoops_upgrade']['steps'][] = $dir;
                $needUpgrade = true;
                if (!empty($upgrader->usedFiles)) {
                    $files = array_merge($files, $upgrader->usedFiles);
                }
            }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:check_version.php


示例20: DirSelectOption

function DirSelectOption($workdir, $selected, $path)
{
    global $xoopsConfig, $wfsConfig, $xoopsModule, $PHP_SELF, $workd;
    $filearray =& getDirList($workdir);
    echo "<select size='1' name='workd' onchange='location.href=\"" . $path . "?rootpath=\"+this.options[this.selectedIndex].value'>";
    echo "<option value=' '>------</option>";
    foreach ($filearray as $workd) {
        if ($workd === $selected) {
            $opt_selected = "selected";
        } else {
            $opt_selected = "";
        }
        echo "<option value='" . $workd . "' {$opt_selected}>" . basename($workd) . "</option>";
    }
    echo "</select>";
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:16,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getDirSize函数代码示例发布时间:2022-05-15
下一篇:
PHP getDir函数代码示例发布时间: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