本文整理汇总了PHP中lscandir_without_dot函数的典型用法代码示例。如果您正苦于以下问题:PHP lscandir_without_dot函数的具体用法?PHP lscandir_without_dot怎么用?PHP lscandir_without_dot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lscandir_without_dot函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getServiceDetails
static function getServiceDetails($list)
{
$ps = lxshell_output("ps", "ax");
$run = Service__linux::getRunLevel();
$rclist = lscandir_without_dot("__path_real_etc_root/rc{$run}.d/");
foreach ($list as &$__l) {
$__l['install_state'] = 'dull';
$__l['state'] = 'off';
$__l['boot_state'] = 'off';
if (lxfile_exists("__path_real_etc_root/init.d/{$__l['servicename']}")) {
$__l['install_state'] = 'on';
} else {
continue;
}
if (self::checkServiceInRc($rclist, $__l['servicename'])) {
$__l['boot_state'] = 'on';
}
if ($__l['grepstring']) {
if (preg_match("/[\\/ ]{$__l['grepstring']}/i", $ps)) {
$__l['state'] = 'on';
}
} else {
$ret = lxshell_return("/etc/init.d/{$__l['servicename']}", "status");
if ($ret) {
$__l['state'] = 'off';
} else {
$__l['state'] = 'on';
}
}
}
return $list;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:32,代码来源:service__redhatlib.php
示例2: fixlogdir_main
function fixlogdir_main()
{
global $gbl, $sgbl, $login, $ghtml;
$progname = $sgbl->__var_program_name;
$logl = lscandir_without_dot("../log");
lxfile_mkdir("../processed_log");
@lunlink("../log/access_log");
@lunlink("/usr/local/lxlabs/ext/php/error.log");
$dir = getNotexistingFile("../processed_log", "proccessed");
system("mv ../log ../processed_log/{$dir}");
mkdir("../log");
$list = lscandir_without_dot("../processed_log");
foreach ($list as $l) {
remove_directory_if_older_than_a_day("../processed_log/{$l}", 6);
}
foreach ($logl as $l) {
lxfile_touch("../log/{$l}");
}
lxfile_generic_chown_rec("../log", "lxlabs:lxlabs");
//
// Related to Issue #15
//
lxfile_generic_chmod_rec("../log", "0640");
lxfile_generic_chmod_rec("../processed_log", "0640");
lxfile_generic_chmod("../log", "0700");
lxfile_generic_chmod("../processed_log", "0700");
lxfile_generic_chmod("../log/lighttpd_error.log", "0644");
lxfile_generic_chmod("../log/access_log", "0644");
lxfile_generic_chown("../log/lighttpd_error.log", "lxlabs:root");
lxfile_generic_chown("../log/access_log", "lxlabs:root");
//
os_restart_program();
}
开发者ID:soar-team,项目名称:kloxo,代码行数:33,代码来源:fixlogdir.php
示例3: getweb_usage
static function getweb_usage($name, $customer_name, $oldtime, $newtime, $d)
{
global $gbl, $sgbl, $login, $ghtml;
$web_home = "{$sgbl->__path_httpd_root}";
$log_path = "{$web_home}/{$name}/stats";
$processedir = "{$sgbl->__path_customer_root}/{$customer_name}/__processed_stats/";
lxfile_mkdir($processedir);
$dir1 = "{$log_path}/";
$files = lscandir_without_dot($dir1);
$total = 0;
foreach ($files as $file) {
if (!strstr($file, "gz")) {
$total += self::getEachwebfilequota("{$dir1}/{$file}", $oldtime, $newtime);
$stat = stat("{$dir1}/{$file}");
if ($stat['size'] >= 50 * 1024 * 1024) {
if (isOn($d->remove_processed_stats)) {
lxfile_rm("{$dir1}/{$file}");
} else {
lxfile_mv("{$dir1}/{$file}", getNotexistingFile($processedir, $file));
}
}
}
}
return $total;
}
开发者ID:zseand,项目名称:kloxo,代码行数:25,代码来源:webtrafficlib.php
示例4: getServiceList
static function getServiceList()
{
global $gbl, $sgbl, $login, $ghtml;
$val = lscandir_without_dot("__path_real_etc_root/init.d");
$val = array_remove($val, $sgbl->__var_programname_web);
$val = array_remove($val, $sgbl->__var_programname_dns);
$val = array_remove($val, $sgbl->__var_programname_imap);
$val = array_remove($val, $sgbl->__var_programname_mmail);
$nval = self::getMainServiceList();
$nval = lx_array_merge(array($nval, $val));
return $nval;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:12,代码来源:service__linuxlib.php
示例5: __xenimport_get_data
function __xenimport_get_data()
{
lxfile_mkdir("/home/oldxenconfig-hypervm");
$list = lscandir_without_dot("/etc/xen/oldxen");
foreach ($list as $l) {
$vm[] = __xenimport_parse_config("/etc/xen/oldxen/{$l}");
//lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
lunlink("/etc/xen/auto/{$l}");
}
dprintr($vm);
return $vm;
}
开发者ID:digideskio,项目名称:hypervm,代码行数:12,代码来源:xenimport__xenmax.php
示例6: __xenimport_get_data
function __xenimport_get_data()
{
lxfile_mkdir("/home/oldxenconfig-hypervm");
$list = lscandir_without_dot("/home/xen");
foreach ($list as $l) {
if (!cse($l, ".vm")) {
continue;
}
$vm[] = __xenimport_parse_config("/home/xen/{$l}/{$l}.cfg");
//lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
}
dprintr($vm);
return $vm;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:14,代码来源:xenimport__hypervm.php
示例7: __xenimport_get_data
function __xenimport_get_data()
{
lxfile_mkdir("/home/oldxenconfig-hypervm");
$list = lscandir_without_dot("/etc/hypervm/");
foreach ($list as $l) {
if (!csb($l, "xm")) {
continue;
}
if (csb($l, "xmexample")) {
continue;
}
$vm[] = __xenimport_parse_config("/etc/xen/{$l}");
//lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
lunlink("/etc/xen/auto/{$l}");
}
dprintr($vm);
return $vm;
}
开发者ID:digideskio,项目名称:hypervm,代码行数:18,代码来源:xenimport__seflow.php
示例8: foreach
$dns = $l->getObject('dns');
$dns->setUpdateSubaction('full_update');
if ($newip && $oldip) {
foreach ($dns->dns_record_a as $drec) {
if ($drec->ttype !== 'a') {
continue;
}
if ($drec->param === $oldip) {
$drec->param = $newip;
}
}
}
$dns->was();
}
}
$list = lscandir_without_dot("/home/httpd");
foreach ($list as $l) {
if (!is_dir("/home/httpd/{$l}")) {
continue;
}
lxfile_unix_chown_rec("/home/httpd/{$l}/stats/", "apache");
}
$driverapp = $gbl->getSyncClass(null, 'localhost', 'web');
if ($driverapp === 'apache') {
// --- issue #589
// addLineIfNotExistInside("/etc/httpd/conf/httpd.conf", "Include /etc/httpd/conf/kloxo/kloxo.conf", "");
lxshell_return("__path_php_path", "../bin/misc/installsuphp.php");
} else {
lxfile_cp("../file/lighttpd/lighttpd.conf", "/etc/lighttpd/lighttpd.conf");
// --- issue #598
// lxfile_cp("../file/lighttpd/conf/kloxo/kloxo.conf", "/etc/lighttpd/conf/kloxo/kloxo.conf");
开发者ID:soar-team,项目名称:kloxo,代码行数:31,代码来源:fixwebdnsfullupdate.php
示例9: checkRestart
function checkRestart()
{
if (if_demo()) {
return;
}
log_log("cron_exec", "Check service restarts...\n");
$res = lscandir_without_dot("__path_program_etc/.restart");
if ($res === false) {
dprint(".restart does not exist... Creating\n");
lxfile_mkdir("__path_program_etc/.restart");
lxfile_generic_chown("__path_program_etc/.restart", "lxlabs");
}
foreach ((array) $res as $r) {
if (csb($r, "._restart_")) {
$cmd = strfrom($r, "._restart_");
}
lunlink("__path_program_etc/.restart/{$r}");
dprint("Restarting {$cmd}\n");
switch ($cmd) {
case 'lxcollectquota':
log_log("cron_exec", "Start collecting Quota's\n");
exec_justdb_collectquota();
break;
case 'openvz_tc':
log_log("cron_exec", "Start openvz_tc script\n");
exec_openvz_tc();
break;
default:
log_log("cron_exec", "Restarting {$cmd}\n");
exec_with_all_closed("/etc/init.d/{$cmd} restart");
break;
}
}
}
开发者ID:soar-team,项目名称:kloxo,代码行数:34,代码来源:lxserverlib.php
示例10: do_serve_file
function do_serve_file($fd, $rem)
{
$file = $rem->filename;
$file = basename($file);
$file = "__path_serverfile/{$file}";
if (!lxfile_exists($file)) {
log_log("servfile", "datafile {$file} dosn't exist, exiting");
print_or_write($fd, "fFile Doesn't {$file} Exist...\n\n\n\n");
return false;
}
$array = lfile_get_unserialize($file);
lunlink($file);
$realfile = $array['filename'];
$pass = $array['password'];
if ($fd) {
dprint("Got request for {$file}, realfile: {$realfile}\n");
}
log_log("servfile", "Got request for {$file} realfile {$realfile}");
if (!($pass && $pass === $rem->password)) {
print_or_write($fd, "fPassword doesn't match\n\n");
return false;
}
if (is_dir($realfile)) {
// This should neverhappen. The directories are zipped at cp-fileserv and tar_to_filserved then itself.
$b = basename($realfile);
lxfile_mkdir("__path_serverfile/tmp/");
$tfile = tempnam("__path_serverfile/tmp/", "{$b}.tar");
$list = lscandir_without_dot($realfile);
lxshell_tar($realfile, $tfile, $list);
$realfile = $tfile;
}
$fpr = lfopen($realfile, "rb");
if (!$fpr) {
print_or_write($fd, "fCouldn't open {$realfile}\n\n");
return false;
}
print_or_write($fd, "s");
while (!feof($fpr)) {
$written = print_or_write($fd, fread($fpr, 8092));
if ($written <= 0) {
break;
}
}
// Just send a newline so that the fgets will break after reading. This has to be removed after the file is read.
print_or_write($fd, "\n");
fclose($fpr);
fileserv_unlink_if_tmp($realfile);
return true;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:49,代码来源:lib.php
示例11: lxfile_cp_content
function lxfile_cp_content($dirsource, $dirdest)
{
$username = "__system__";
$dirdest = expand_real_root($dirdest);
$dirsource = expand_real_root($dirsource);
if (!lxfile_exists($dirdest)) {
lxfile_mkdir($dirdest);
}
$list = lscandir_without_dot($dirsource);
foreach ($list as $l) {
lxfile_cp_rec("{$dirsource}/{$l}", "{$dirdest}/{$l}");
}
}
开发者ID:zseand,项目名称:kloxo,代码行数:13,代码来源:linuxfslib.php
示例12: updatecollectModInfo
function updatecollectModInfo()
{
$modlist = $this->getList('module');
foreach ((array) $modlist as $m) {
$m->delete();
$m->metadbaction = 'writeonly';
}
$this->was();
$list = lscandir_without_dot(getreal("/module/"));
foreach ($list as $l) {
if ($l === 'define.inc') {
continue;
}
$m = new Module(null, null, $l);
$m->dbaction = 'add';
$m->parent_clname = $this->getClName();
$m->write();
}
return null;
}
开发者ID:zseand,项目名称:kloxo,代码行数:20,代码来源:clientbaselib.php
示例13: clear_extra_backups
static function clear_extra_backups($class, $name, $object)
{
global $gbl, $sgbl, $login, $ghtml;
$progname = $sgbl->__var_program_name;
$bpath = "__path_program_home/{$class}/{$name}/__backup";
$list = lscandir_without_dot($bpath);
$dellist = self::getDeleteList($object, $list);
dprint("Delete list\n");
dprintr($dellist);
$num = $object->rm_last_number ? $object->rm_last_number : 5;
print "Deleting Old backups.... Will retain {$num}.\n";
$bpath = "__path_program_home/{$class}/{$name}/__backup";
foreach ($dellist as $k => $v) {
print "deleting {$v}\n";
lunlink("{$bpath}/{$v}");
}
print "deleting old backups from ftp server\n";
$fn = null;
$mylogin = null;
if (!$object->ftp_server) {
return;
}
$fn = ftp_connect($object->ftp_server);
$mylogin = ftp_login($fn, $object->rm_username, $object->rm_password);
if (!$fn) {
return;
}
$list = ftp_nlist($fn, $object->rm_directory);
print "Total list of files in ftp server\n";
print_r($list);
$dellist = self::getDeleteList($object, $list);
print "Deleting these files on remote server.\n";
print_r($dellist);
foreach ((array) $dellist as $k => $v) {
$v = basename($v);
if ($object->rm_directory) {
$v = "{$object->rm_directory}/{$v}";
}
ftp_delete($fn, $v);
}
ftp_close($fn);
}
开发者ID:digideskio,项目名称:hypervm,代码行数:42,代码来源:lxbackuplib.php
示例14: checkRestart
function checkRestart()
{
if (if_demo()) {
return;
}
$res = lscandir_without_dot("__path_program_etc/.restart");
if ($res === false) {
dprint(".restart does not exist... Creating\n");
lxfile_mkdir("__path_program_etc/.restart");
lxfile_generic_chown("__path_program_etc/.restart", "lxlabs");
}
foreach ((array) $res as $r) {
if (csb($r, "._restart_")) {
$cmd = strfrom($r, "._restart_");
}
lunlink("__path_program_etc/.restart/{$r}");
dprint("Restarting {$cmd}\n");
// THe 3,4 etc are the tcp ports of this program, and it should be closed, else some programs will grab it.
//exec("/etc/init.d/$cmd restart </dev/null >/dev/null 2>&1 3</dev/null 4</dev/null 5</dev/null 6</dev/null &");
switch ($cmd) {
case 'lxcollectquota':
exec_justdb_collectquota();
break;
case 'openvz_tc':
exec_openvz_tc();
break;
default:
exec_with_all_closed("/etc/init.d/{$cmd} restart");
break;
}
}
}
开发者ID:zseand,项目名称:kloxo,代码行数:32,代码来源:lxserverlib.php
示例15: lxfile_dstat
function lxfile_dstat($dir, $duflag)
{
$dir = expand_real_root($dir);
$list = lscandir_without_dot($dir);
$ret = null;
foreach ($list as $l) {
$stat = lstat("{$dir}/{$l}");
get_file_type("{$dir}/{$l}", $stat);
remove_unnecessary_stat($stat);
if ($duflag && is_dir("{$dir}/{$l}") || $l === ".trash") {
$stat['size'] = lxfile_dirsize("{$dir}/{$l}", true);
} else {
$stat['size'] = lxfile_size("{$dir}/{$l}");
}
$stat['name'] = "{$dir}/{$l}";
$ret[] = $stat;
}
//dprintr($ret);
return $ret;
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:20,代码来源:commonfslib.php
示例16: createTemplate
public function createTemplate()
{
$stem = explode("-", $this->main->ostemplate);
if ($this->main->isWindows()) {
$name = "{$stem[0]}-";
} else {
$name = "{$stem[0]}-{$stem[1]}-{$stem[2]}-";
}
$templatename = "{$name}{$this->main->newostemplate_name_f}";
if ($this->main->isWindows()) {
$tempfpath = "__path_program_home/xen/template/{$templatename}.img";
} else {
$tempfpath = "__path_program_home/xen/template/{$templatename}.tar.gz";
}
$this->stop();
if ($this->main->isWindows()) {
$partition = $this->getPartition();
lxshell_return("ntfsfix", $partition);
lxshell_return("ntfsclone", "--save-image", "--force", "-O", $tempfpath, $partition);
$this->kpart_remove();
} else {
$list = lscandir_without_dot("{$this->main->configrootdir}/mnt");
$ret = lxshell_return("tar", "-C", "{$this->main->configrootdir}/mnt", '--numeric-owner', "-czf", $tempfpath, $list);
}
$this->start();
$filepass = cp_fileserv($tempfpath);
$ret = array("__syncv___ostemplate_filepass" => $filepass, "__syncv___ostemplate_filename" => basename($tempfpath));
return $ret;
}
开发者ID:digideskio,项目名称:hypervm,代码行数:29,代码来源:vps__xenlib.php
示例17: print_time
print_time("include");
include_once "htmllib/phplib/lib/lxclass.php";
include_once "htmllib/lib/commonfslib.php";
include_once "htmllib/lib/objectactionlib.php";
include_once "htmllib/lib/commandlinelib.php";
include_once "lib/sgbl.php";
include_once "lib/gbl.php";
include_once "htmllib/lib/lib.php";
include_once "htmllib/phplib/lxlib.php";
include_once "htmllib/phplib/common.inc";
include_once "htmllib/lib/remotelib.php";
include_once "htmllib/phplib/lib/lxdb.php";
include_once "lib/define.php";
include_once "lib/driver_define.php";
include_once "lib/sgbl.php";
include_once "lib/common.inc";
//include_once "htmllib/lib/xmlinclude.php";
// This is the program specific common lib. There is no need dump everything htmllib/lib/lib.php which has become too large.
include_once "lib/programlib.php";
if (lxfile_exists("../etc/classdefine")) {
$list = lscandir_without_dot("../etc/classdefine");
foreach ($list as $l) {
if (cse($l, "phps")) {
include_once "../etc/classdefine/{$l}";
}
}
}
if (WindowsOs()) {
include_once "htmllib/lib/lxcomlib.php";
}
//print_time("include", "include");
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:31,代码来源:include.php
示例18: lscandir_without_dot
<?php
include_once "htmllib/lib/include.php";
$path = "/var/spool/cron";
$list = lscandir_without_dot($path);
foreach ($list as $l) {
lunlink("{$path}/{$l}");
}
initProgram('admin');
$login->loadAllObjects('cron');
$list = $login->getList('cron');
foreach ($list as $c) {
$c->__parent_o = null;
$w = $c->getParentO();
$c->username = $w->username;
$c->setUpdateSubaction('update');
$c->was();
}
开发者ID:soar-team,项目名称:kloxo,代码行数:18,代码来源:cronfix.php
示例19: initThisList
static function initThisList($parent, $class)
{
// Load entire Session
$result = null;
$list = lscandir_without_dot("__path_program_root/session");
foreach ($list as $l) {
$pp = lfile_get_json_unserialize("__path_program_root/session/{$l}");
if (!$pp) {
lunlink("__path_program_root/session/{$l}");
continue;
}
if (!$parent->isAdmin()) {
//$result = $db->getRowsWhere("parent_clname = '" . $parent->getClName() . "'");
if ($pp['parent_clname'] !== $parent->getClName()) {
continue;
}
}
$result[] = $pp;
}
if ($result) {
$parent->setListFromArray($parent->__masterserver, $parent->__readserver, 'ssessionlist', $result, true);
}
return null;
}
开发者ID:soar-team,项目名称:kloxo,代码行数:24,代码来源:ssession.php
示例20: updateform
function updateform($subaction, $param)
{
global $gbl, $sgbl, $login, $ghtml;
$progname = $sgbl->__var_program_name;
switch ($subaction) {
case "skin":
// ACtually the skin_color list should be dependent on the skin_name,
// but currently just reading the current skin directory itself.
// So all the skins should have the same color sets, which is not very practical,
// so this should be changed in the future.
if (!$this->getParentO()->isLogin() || $this->isClass('sp_childspecialplay')) {
$vlist['specialplay_b-dont_show_disabled_permission'] = null;
}
$vlist['specialplay_b-enable_ajax'] = null;
$vlist['specialplay_b-simple_skin'] = null;
if ($this->specialplay_b->skin_name === 'feather') {
$vlist['specialplay_b-show_thin_header'] = null;
}
$vlist['specialplay_b-close_add_form'] = null;
if (!$this->isAdmin()) {
$list = get_namelist_from_objectlist($login->getList('interface_template'));
$list = lx_array_merge(array(array("--{$progname}-default--"), $list));
}
//$vlist['specialplay_b-interface_template'] = array('s', $list);
$vlist['specialplay_b-skin_name'] = array('s', lscandir_without_dot(getreal("/img/skin/{$progname}")));
$vlist['specialplay_b-skin_color'] = array('s', lscandir_without_dot(getreal("/img/skin/{$progname}/" . $this->specialplay_b->skin_name)));
// DT #799 - Scan also the dir for new iconsets.
$vlist['specialplay_b-icon_name'] = array('s', lscandir_without_dot(getreal("/img/image")));
$vlist['specialplay_b-language'] = array('A', $this->getLanguage());
//$vlist['specialplay_b-login_page'] =array('s', $this->getParentO()->getLoginTo());
//$vlist['specialplay_b-split_frame'] = null;
//$vlist['specialplay_b-show_help'] =null;
if ($this->getParentO()->isLte('reseller') && $sgbl->isKloxo()) {
$vlist['specialplay_b-customermode_flag'] = null;
}
//$vlist['specialplay_b-disable_quickaction'] = null;
if (!$this->getParentO()->isLogin()) {
$vlist['specialplay_b-logo_image'] = null;
$vlist['specialplay_b-logo_image_loading'] = null;
}
/*
if ($sgbl->isKloxo()) {
if (!$this->getParentO()->isLogin()) {
$vlist['specialplay_b-disable_docroot'] = null;
}
}
*/
//$vlist['specialplay_b_s_show_add_buttons'] =null;
//$vlist['specialplay_b-lpanel_scrollbar'] = null;
//$vlist['specialplay_b-resource_bottom'] =null;
//$vlist['specialplay_b_s_show_brethren_list'] = array('s', array('off', 'top', 'left'));
//$vlist['specialplay_b_s_lpanel_group_resource'] =null;
//$vlist['specialplay_b_s_ultra_navig'] =null;
//$vlist['specialplay_b-lpanel_depth'] = null;
$vlist['__v_updateall_button'] = array();
//$vlist['specialplay_b_s_per_page'] = null;
return $vlist;
case "upload_logo":
if ($login->priv->isOn('logo_manage_flag')) {
// $vlist['specialplay_b-logo_image'] =array('I', array("width" => 20, "height" => 20, "value" => $this->specialplay_b->logo_image));
// trick use 'null' for guarantee 100% size of img (not 100% size div container)
$vlist['specialplay_b-logo_image'] = array('I', array("width" => "null", "height" => "null", "value" => "/img/user-logo.png"));
$vlist['logo_image_f'] = null;
// $vlist['specialplay_b-logo_image_loading'] =array('I', array("width" => 20, "height" => 20, "value" => $this->specialplay_b->logo_image_loading));
// $vlist['logo_image_loading_f'] = null;
}
return $vlist;
case "login_options":
if ($login->isAdmin()) {
$gen = $login->getObject('general')->generalmisc_b;
$this->specialplay_b->disableipcheck = $gen->disableipcheck;
$vlist['specialplay_b-disableipcheck'] = null;
}
$vlist['specialplay_b-ssession_timeout'] = null;
return $vlist;
case "demo_status":
$vlist['specialplay_b-demo_status'] = null;
return $vlist;
}
}
开发者ID:soar-team,项目名称:kloxo,代码行数:80,代码来源:appearancelib.php
注:本文中的lscandir_without_dot函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论