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


PHP Dir::readAll方法代码示例

本文整理汇总了PHP中Dir::readAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Dir::readAll方法的具体用法?PHP Dir::readAll怎么用?PHP Dir::readAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dir的用法示例。


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

示例1: sitetemplate_get_apps

function sitetemplate_get_apps()
{
    $dir = new Dir('inc/app');
    $apps = array();
    foreach ($dir->readAll() as $file) {
        if ($file != 'CVS' && strpos($file, '.') !== 0) {
            if (@file_exists('inc/app/' . $file . '/conf/config.ini.php')) {
                $apps[] = $file;
            }
        }
    }
    return $apps;
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:13,代码来源:Functions.php

示例2: array

    $cgi->format = 'html';
}
// get the path root from the boxchooser-path session variable,
// and if not then default to /inc/data.
$data = array('location' => '/inc/app', 'boxes' => array(), 'name' => $parameters['name']);
$path = session_get('boxchooser_path');
if (!$path) {
    $path = $root;
    $data['base_nice_url'] = "Standard Boxes";
} else {
    $data['base_nice_url'] = $path;
}
$applications = parse_ini_file('inc/conf/auth/applications/index.php');
// get all the data
$dir = new Dir($path);
foreach ($dir->readAll() as $file) {
    if ($file != 'CVS' && strpos($file, '.') !== 0) {
        if (file_exists($path . '/' . $file . '/conf/config.ini.php')) {
            $config_file = parse_ini_file($path . '/' . $file . '/conf/config.ini.php');
            if (!$config_file['boxchooser']) {
                continue;
            }
            if (isset($applications[$file]) && !$applications[$file]) {
                continue;
            }
            if ($config_file['app_name']) {
                //add data to the boxes array
                $temp = $config_file['description'];
                $desc = $file;
                if ($temp != '') {
                    $desc = $temp;
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php

示例3: getApps

 /**
  * List all the apps that contain workflow services.  Return value is
  * a hash of the app names (keys) and the app display names (values).
  *
  * @access public
  * @return array
  *
  */
 function getApps()
 {
     $apps = array();
     loader_import('saf.File.Directory');
     $d = new Dir('inc/app');
     foreach ($d->readAll() as $file) {
         if (strpos($file, '.') === 0 || !file_exists('inc/app/' . $file . '/conf/config.ini.php')) {
             continue;
         }
         $c = ini_parse('inc/app/' . $file . '/conf/config.ini.php', false);
         if ($c['workflow']) {
             $apps[$file] = $c['app_name'];
         }
     }
     return $apps;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:24,代码来源:Workflow.php

示例4: getCollections

 /**
  * Returns a list of collection names for use in looping
  * through multiple collections at a time.  Called as a
  * static method, ie. Rex::getCollections ().
  *
  * @return array
  */
 function getCollections()
 {
     loader_import('saf.File.Directory');
     $dir = new Dir('inc/app/cms/conf/collections');
     $list = array();
     foreach ($dir->readAll() as $file) {
         if (strpos($file, '.') === 0 || !strstr($file, '.php')) {
             continue;
         }
         $list[] = str_replace('.php', '', $file);
     }
     $dir->close();
     return $list;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:21,代码来源:Rex.php

示例5: array

loader_import('saf.File.Directory');
if (empty($cgi->format)) {
    $cgi->format = 'html';
}
$data = array('location' => 'inc/html', 'base_nice_url' => 'Standard Templates', 'template_sets' => array());
page_title(intl_get('Choose a Template'));
$path = session_get('sitetemplate_path');
if (!$path) {
    $path = $root;
} else {
    $data['base_nice_url'] = $path;
}
//page_title (intl_get ('Folder') . ': ' . $data['location']);
$template_sets = new Dir($path);
$config_file;
foreach ($template_sets->readAll() as $file) {
    if ($file == 'CVS' || strpos($file, '.') === 0 || !@is_dir('inc/html/' . $file)) {
        continue;
    }
    if (file_exists($path . '/' . $file . '/config.ini.php')) {
        $config_file = parse_ini_file($path . '/' . $file . '/config.ini.php');
    } else {
        $config_file = array();
    }
    $desc = $config_file['description'];
    $set_name = $config_file['set_name'];
    if ($set_name == '') {
        $set_name = str_replace('inc/html/', '', $file);
    }
    if ($desc == '') {
        $desc = $set_name;
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php

示例6: fetch

 /**
  * Fetches all the files in a directory in a single command,
  * ie. $files = Dir::fetch ('foo/bar');
  *
  * @access	public
  * @param	string	$path
  * @return	array	files
  *
  */
 function fetch($path, $skipDots = false)
 {
     $d = new Dir($path);
     if (!$d) {
         return array();
     }
     $files = $d->readAll();
     if ($skipDots) {
         foreach ($files as $k => $v) {
             if (strpos($v, '.') === 0) {
                 unset($files[$k]);
             }
         }
     }
     //$d->close ();
     return $files;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:Directory.php


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