本文整理汇总了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);
}
示例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')) {
示例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);
}
示例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);
}
示例5: get_post_count
public function get_post_count($id)
{
return count(Filesystem::ls(PATH_POSTS, '*.*.' . $id . '.*.*.*.*.*.*.*.*', 'xml', false, false, false));
}
示例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);
}
示例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
示例8: get_themes
public function get_themes()
{
$tmp_array = array();
$files = Filesystem::ls(PATH_THEMES, '*', 'bit', true, false, false);
return $files;
}