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


PHP FileSystem::list_dirs方法代码示例

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


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

示例1: index

 function index()
 {
     $data = FileSystem::list_dirs($this->directory, 0);
     $this->data = array();
     for ($i = 0; $i < count($data); $i++) {
         array_push($this->data, basename($data[$i]));
     }
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:8,代码来源:fragment.php

示例2: ListDirsOptionalRecurse

 function ListDirsOptionalRecurse($dir, $recurse = 1, $dirs = array())
 {
     return FileSystem::list_dirs($dir, $recurse, $dirs);
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:4,代码来源:core.php

示例3: die

# Load the currently installed language.
# This feature is not fully implemented.
# ###################################################################################
$Core->loadLanguage();
if (!$Core->ValidateRequest("upload_image", true)) {
    die("<h2>Your session has expired. Please log in.</h2>");
}
$dirs = FileSystem::list_dirs('../data/media/');
$message = '<h2>Upload a new Image</h2>';
$success = false;
$index = $Core->GetVar($_GET, 'wym', 0);
if (isset($_FILES['upload']) && !empty($_FILES['upload']['name'])) {
    $file = $_FILES['upload'];
    $dest = $_POST['upload_dir'];
    $types = array('image/png', 'image/jpeg', 'image/gif', 'application/mpeg');
    $targets = FileSystem::list_dirs(SB_MEDIA_DIR);
    array_push($targets, SB_DOWNLOADS_DIR);
    array_push($targets, SB_UPLOADS_DIR);
    array_push($targets, ACTIVE_SKIN_DIR . "images/");
    list($exitCode, $newfile) = $Core->UploadFile($file, $dest, $types, 5000000, $targets);
    if ($exitCode == 1) {
        $success = true;
        $message = '<div class="msg-success-small"><h2>Success!</h2></div>';
    } else {
        $message = '<div class="msg-error-small"><h2>An unknown error occurred</h2></div>';
    }
}
?>
<html>
    <head>
        <script type="text/javascript" src="../ui/admin/js/jquery.js"></script>
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:31,代码来源:image.upload.php

示例4: setTargets

 function setTargets()
 {
     $this->targets = FileSystem::list_dirs(SB_MEDIA_DIR);
     array_push($this->targets, SB_DOWNLOADS_DIR);
     array_push($this->targets, SB_UPLOADS_DIR);
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:6,代码来源:media.class.php

示例5: delete_dir

 function delete_dir($dir, $contentsOnly = true)
 {
     if (!is_dir($dir)) {
         return false;
     }
     $files = FileSystem::list_files($dir, true);
     for ($i = 0; $i < count($files); $i++) {
         unlink($files[$i]);
     }
     $subdirs = FileSystem::list_dirs($dir);
     rsort($subdirs);
     for ($i = 0; $i < count($subdirs); $i++) {
         rmdir($subdirs[$i]);
     }
     if (!$contentsOnly) {
         return rmdir($dir);
     }
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:18,代码来源:filesystem.php

示例6: define

define('SKYBLUE', 1);
define('_SBC_ROOT_', '../');
define('BASE_PAGE', 'index.php');
require_once _SBC_ROOT_ . 'base.php';
require_once './functions.php';
$Filter = new Filter();
$Router = new Router(_SBC_ROOT_);
$Core = new Core(array('path' => _SBC_ROOT_, 'lifetime' => 3600, 'events' => array('OnBeforeInitPage', 'OnBeforeShowPage', 'OnAfterShowPage', 'OnRenderPage', 'OnAfterLoadStory', 'OnBeforeUnload')));
$config = $Core->LoadConfig();
define('RSS_META_FILE', SB_XML_DIR . 'meta.xml');
define('RSS_PAGE_FILE', SB_XML_DIR . 'page.xml');
define('RSS_TEXT_LENGTH', 500);
define('RSS_NO_DESCRIPTION', 'No description available.');
$meta = $Core->xmlHandler->ParserMain(RSS_META_FILE);
$pages = $Core->xmlHandler->ParserMain(RSS_PAGE_FILE);
$fragments = FileSystem::list_dirs(ACTIVE_SKIN_DIR . 'fragments/');
header('Content-type: text/xml');
?>
    
<rss version="2.0">
    <channel>
        <title><?php 
echo SB_SITE_NAME;
?>
</title>
        <link><?php 
echo FULL_URL;
?>
</link>
        <description><![CDATA[<?php 
echo rss_site_description();
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:31,代码来源:index.php


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