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


PHP Filesystem::ls方法代码示例

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


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

示例1: uninstall

 public function uninstall()
 {
     $path = PATH_PLUGINS_DB . $this->dir_name;
     $files = Filesystem::ls($path . '/', '*', '*');
     foreach ($files as $file) {
         unlink($path . '/' . $file);
     }
     return rmdir($path);
 }
开发者ID:Kludges,项目名称:nibbleblog,代码行数:9,代码来源:plugin.class.php

示例2: array

require PATH_HELPERS . 'validation.class.php';
// =====================================================================
//  VARIABLES
// =====================================================================
$permissions_dir = 0755;
$php_modules = array();
$installation_complete = false;
$dependencies = true;
$domain = getenv('HTTP_HOST');
$base_path = dirname(getenv('SCRIPT_NAME'));
if ($base_path != '/') {
    $base_path .= '/';
}
$blog_address = 'http://' . $domain . $base_path;
$languages = array();
$files = Filesystem::ls(PATH_LANGUAGES, '*', 'bit', false, false, false);
foreach ($files as $file) {
    include PATH_LANGUAGES . $file;
    $iso = basename($file, '.bit');
    $languages[$iso] = $_LANG_CONFIG['DATA']['native'];
}
// ============================================================================
//  SYSTEM
// ============================================================================
// PHP MODULES
if (function_exists('get_loaded_extensions')) {
    $php_modules = get_loaded_extensions();
}
// WRITING TEST
// Try to give permissions to the directory content
if (!file_exists('content')) {
开发者ID:newbacknew,项目名称:owloo.com,代码行数:31,代码来源:install.php

示例3: set_files_by_category

 private function set_files_by_category($id_cat)
 {
     $this->files = Filesystem::ls(PATH_POSTS, '*.*.' . $id_cat . '.*.NULL.*.*.*.*.*.*', 'xml', false, false, true);
     $this->files_count = count($this->files);
 }
开发者ID:newbacknew,项目名称:owloo.com,代码行数:5,代码来源:db_posts.class.php

示例4: set_files_by_draft

 private function set_files_by_draft()
 {
     $this->files = Filesystem::ls(PATH_PAGES, '*.*.*.draft.*', 'xml', false, false, true);
     $this->files_count = count($this->files);
 }
开发者ID:Kludges,项目名称:nibbleblog,代码行数:5,代码来源:db_pages.class.php

示例5: get_post_count

 public function get_post_count($id)
 {
     return count(Filesystem::ls(PATH_POSTS, '*.*.' . $id . '.*.*.*.*.*.*.*.*', 'xml', false, false, false));
 }
开发者ID:Kludges,项目名称:nibbleblog,代码行数:4,代码来源:db_categories.class.php

示例6: set_files_by_post

 private function set_files_by_post($id_post, $type = 'NULL')
 {
     $this->files = Filesystem::ls(PATH_COMMENTS, '*.' . $id_post . '.*.' . $type . '.*.*.*.*.*.*', 'xml', false, true, true);
     $this->files_count = count($this->files);
 }
开发者ID:Kludges,项目名称:nibbleblog,代码行数:5,代码来源:db_comments.class.php

示例7: utf8_encode

    $children->attributes()->slug = utf8_encode($slug);
    // Position
    @$children->addAttribute('position', '');
    $children->attributes()->position = utf8_encode($position);
    $position++;
}
$obj->asXml(FILE_XML_CATEGORIES);
echo Html::p(array('class' => 'pass', 'content' => 'Categories updated...'));
// =====================================================
// Uninstall plugins
// =====================================================
$plugins = array('last_posts');
foreach ($plugins as $plugin) {
    $path = PATH_PLUGINS_DB . $plugin;
    if (file_exists($path . '/db.xml')) {
        $files = Filesystem::ls($path . '/', '*', '*');
        foreach ($files as $file) {
            unlink($path . '/' . $file);
        }
        rmdir($path);
        echo Html::p(array('class' => 'pass', 'content' => 'Plugin ' . $plugin . ' uninstalled, plugin deprecated.'));
    }
}
?>
		</section>

		<footer>
			<p><a href="http://nibbleblog.com">Nibbleblog <?php 
echo NIBBLEBLOG_VERSION;
?>
 "<?php 
开发者ID:Kludges,项目名称:nibbleblog,代码行数:31,代码来源:update.php

示例8: get_themes

 public function get_themes()
 {
     $tmp_array = array();
     $files = Filesystem::ls(PATH_THEMES, '*', 'bit', true, false, false);
     return $files;
 }
开发者ID:Kludges,项目名称:nibbleblog,代码行数:6,代码来源:db_settings.class.php


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