本文整理汇总了PHP中gpFiles::readDir方法的典型用法代码示例。如果您正苦于以下问题:PHP gpFiles::readDir方法的具体用法?PHP gpFiles::readDir怎么用?PHP gpFiles::readDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpFiles
的用法示例。
在下文中一共展示了gpFiles::readDir方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetThemeColors
/**
* Get a list of theme subfolders that have style.css files
*
*/
function GetThemeColors($dir)
{
$subdirs = gpFiles::readDir($dir, 1);
$colors = array();
asort($subdirs);
foreach ($subdirs as $subdir) {
$css_path = $dir . '/' . $subdir . '/style.css';
$less_path = $dir . '/' . $subdir . '/style.less';
if (file_exists($css_path) || file_exists($less_path)) {
$colors[$subdir] = $subdir;
}
}
return $colors;
}
示例2: getPossible
function getPossible()
{
global $dataDir, $langmessage;
$possible = $this->variables;
//$langDir = $dataDir.'/include/thirdparty/fckeditor/editor/lang'; //fckeditor
$langDir = $dataDir . '/include/thirdparty/ckeditor_34/lang';
//ckeditor
$possible['langeditor'] = gpFiles::readDir($langDir, 'js');
unset($possible['langeditor']['_languages']);
$possible['langeditor']['inherit'] = ' ' . $langmessage['default'];
//want it to be the first in the list
asort($possible['langeditor']);
//recaptcha language
$possible['recaptcha_language'] = array();
$possible['recaptcha_language']['inherit'] = $langmessage['default'];
$possible['recaptcha_language']['en'] = 'en';
$possible['recaptcha_language']['nl'] = 'nl';
$possible['recaptcha_language']['fr'] = 'fr';
$possible['recaptcha_language']['de'] = 'de';
$possible['recaptcha_language']['pt'] = 'pt';
$possible['recaptcha_language']['ru'] = 'ru';
$possible['recaptcha_language']['es'] = 'es';
$possible['recaptcha_language']['tr'] = 'tr';
//website language
$possible['language'] = $this->GetPossibleLanguages();
//jQuery
$possible['jquery'] = array('local' => $langmessage['None'], 'google' => 'jQuery', 'jquery_ui' => 'jQuery & jQuery UI');
//tidy
if (function_exists('tidy_parse_string')) {
$possible['HTML_Tidy'] = array('off' => $langmessage['Off'], '' => $langmessage['On']);
} else {
$possible['HTML_Tidy'] = array('' => 'Unavailable');
}
//
$possible['require_email'] = array('none' => 'None', '' => 'Subject & Message', 'email' => 'Subject, Message & Email');
//see xoopsmultimailer.php
$possible['mail_method'] = array('mail' => 'PHP mail()', 'sendmail' => 'sendmail', 'smtp' => 'smtp', 'smtpauth' => 'SMTPAuth');
gpSettingsOverride('configuration', $possible);
return $possible;
}
示例3: GetThemeColors
function GetThemeColors($dir)
{
$subdirs = gpFiles::readDir($dir, 1);
$colors = array();
asort($subdirs);
foreach ($subdirs as $subdir) {
if ($subdir == 'images') {
continue;
}
$colors[$subdir] = $subdir;
}
return $colors;
}
示例4: CleanInstallFolder
function CleanInstallFolder()
{
$addoncode = $this->addon_folder;
$folders = gpFiles::readDir($addoncode, 1);
foreach ($folders as $folder) {
if (!isset($this->config[$folder])) {
$full_path = $addoncode . '/' . $folder;
gpFiles::RmAll($full_path);
}
}
}
示例5: GetSubdirs
function GetSubdirs($dir)
{
global $config;
if (is_readable($dir)) {
return gpFiles::readDir($dir, 1);
}
return false;
}