本文整理汇总了PHP中lxfile_rm函数的典型用法代码示例。如果您正苦于以下问题:PHP lxfile_rm函数的具体用法?PHP lxfile_rm怎么用?PHP lxfile_rm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lxfile_rm函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: updateUpdate
function updateUpdate($param)
{
lxfile_mkdir("img/custom");
if ($_FILES['upload']['tmp_name']) {
lxfile_rm("img/custom/{$this->nname}.gif");
lxfile_mv($_FILES['upload']['tmp_name'], "img/custom/{$this->nname}.gif");
lxfile_generic_chmod("img/custom/{$this->nname}.gif", "0755");
}
return $param;
}
示例3: installapp_data_update
function installapp_data_update()
{
print fill_string("Fetch current InstallApp version", 50);
$string = file_get_contents("http://download.lxcenter.org/download/installapp/version.list");
$rmt = unserialize($string);
if (!$rmt) {
throw new lxexception(" could_not_get_application_version_list", '', "");
}
print " OK ";
$remver = $rmt->applist['installapp'];
print "version is {$remver}\n";
if (lxfile_exists("/home/kloxo/httpd/installappdata")) {
print fill_string("Fetch local InstallApp version", 50);
$loc = get_local_application_version_list();
$locver = $loc->applist['installapp'];
print " OK version is {$locver}\n";
if ($remver != $locver) {
print fill_string("New installapp found", 50);
print " OK\n";
}
}
print fill_string("Checking for old installappdata.zip", 50);
if (lxfile_exists("/tmp/installappdata.zip")) {
lxfile_rm("/tmp/installappdata.zip");
}
print " OK\n";
print fill_string("Downloading InstallApp data...", 50);
system("cd /tmp ; wget -q http://download.lxcenter.org/download/installapp/installappdata.zip");
if (!lxfile_exists("/tmp/installappdata.zip")) {
print " ERROR\n";
print "Could not download data from LxCenter.\nAborted.\n\n";
return;
}
print " OK\n";
print fill_string("Remove old InstallApp data", 50);
// lxfile_rm_rec("__path_kloxo_httpd_root/installappdata");
// lxfile_mkdir("__path_kloxo_httpd_root/installappdata");
lxfile_rm_rec("/home/kloxo/httpd/installappdata");
lxfile_mkdir("/home/kloxo/httpd/installapp");
lxfile_mkdir("/home/kloxo/httpd/installappdata");
print " OK\n";
print fill_string("Unpack new InstallApp data", 50);
// lxshell_unzip("lxlabs", "__path_kloxo_httpd_root/installappdata/", "/tmp/installappdata.zip");
system("cd /home/kloxo/httpd/installappdata ; unzip -qq /tmp/installappdata.zip");
print " OK\n";
print fill_string("Remove downloaded InstallApp data zip file", 50);
lxfile_rm("/tmp/installappdata.zip");
print " OK\n";
}
示例4: createDiruserfile
function createDiruserfile()
{
$dir = '__path_httpd_root/' . $this->main->getParentName() . '/__dirprotect';
$dirfile = $dir . '/' . $this->main->getFileName();
$chownug = $this->main->__var_username . ':apache';
if (!lxfile_exists($dir)) {
lxuser_mkdir($chownug, $dir);
lxfile_generic_chmod($dir, '0750');
}
lxfile_rm($dirfile);
if ($this->main->status == 'on') {
$fstr = '';
foreach ($this->main->diruser_a as $v) {
$fstr .= $v->nname . ':' . crypt($v->param) . "\n";
}
lxuser_put_contents($chownug, $dirfile, $fstr);
lxfile_generic_chmod($dirfile, '0750');
}
}
示例5: syncSpamUserPref
function syncSpamUserPref()
{
global $gbl, $sgbl, $ghtml;
// The parent can be either a domain or a user. CHeck for the @ sign.
if (csa($this->main->nname, "@")) {
list($user, $domain) = explode("@", $this->main->nname);
} else {
$domain = $this->main->nname;
$user = null;
}
// --- issue #578/#721 - missing in version 6.1.6
// $mailpath = "/home/lxadmin/mail";
$mailpath = mmail__qmail::getDir($domain);
if ($user) {
// $prefpath = "$mailpath/domains/{$domain}/{$user}/user_prefs";
$prefpath = "{$mailpath}/{$user}/user_prefs";
} else {
return;
}
if (!lxfile_exists(dirname($prefpath))) {
lxfile_mkdir(dirname($prefpath));
lxfile_generic_chown(dirname($prefpath), "lxpopuser:lxpopgroup");
}
$fdata = null;
$fdata .= "required_score " . $this->main->spam_hit . "\n";
$fdata .= "ok_locales all\n";
$fdata .= "rewrite_header Subject {$this->main->subject_tag}\n";
foreach ((array) $this->main->wlist_a as $wlist) {
$fdata .= "whitelist_from " . $wlist->nname . "\n";
}
$fdata .= "#***********************************\n";
foreach ((array) $this->main->blist_a as $blist) {
$fdata .= "blocklist_from " . $blist->nname . "\n";
}
lxfile_rm($prefpath);
lfile_write_content($prefpath, $fdata, "lxpopuser:lxpopgroup");
}
示例6: dbactionDelete
function dbactionDelete()
{
//
$wname = fix_nname_to_be_variable($this->main->nname);
lxfile_rm("/var/bogofilter/{$wname}.wordlist.db");
}
示例7: lxfile_mv
function lxfile_mv($src, $dst)
{
global $gbl, $sgbl, $login, $ghtml;
$src = expand_real_root($src);
$dst = expand_real_root($dst);
if (is_dir($dst)) {
$base = basename($src);
$dst = $dst . "/{$base}";
}
if ($sgbl->dbg > 0) {
log_filesys("Moving {$src} {$dst}");
}
if (!lxfile_cp($src, $dst)) {
lxfile_rm($src);
return true;
}
return false;
}
示例8: setInternalParam
public function setInternalParam($mountpoint)
{
$name = $this->main->ostemplate;
if ($this->main->isWindows()) {
return;
}
if (!$mountpoint) {
return;
}
if ($name === 'unknown') {
return;
}
$name = strtolower($name);
$mountpoint = expand_real_root($mountpoint);
$result = $this->getScriptS($name);
dprint("Distro Name {$name}, Scripts: \n");
dprintr($result);
$init = strtilfirst($name, "-");
dprint("File is {$init}.inittab\n");
if (lxfile_exists("../file/sysfile/inittab/{$init}.inittab")) {
dprint("Copying {$init}.inittab\n");
$content = lfile_get_contents("../file/sysfile/inittab/{$init}.inittab");
if ($this->main->text_inittab) {
$content .= "\n{$this->main->text_inittab}";
}
lfile_put_contents("{$mountpoint}/etc/inittab", $content);
}
$iplist = get_namelist_from_objectlist($this->main->vmipaddress_a);
if ($this->main->mainipaddress) {
$main_ip = $this->main->mainipaddress;
$iplist = array_remove($iplist, $main_ip);
} else {
$main_ip = array_shift($iplist);
}
if ($this->main->networknetmask) {
$main_netmask = $this->main->networknetmask;
} else {
$main_netmask = "255.255.255.0";
}
$iplist = implode(" ", $iplist);
$ipadd = $result['ADD_IP'];
$sethostname = $result['SET_HOSTNAME'];
$setuserpass = $result['SET_USERPASS'];
$ipdel = $result['DEL_IP'];
if ($this->main->networkgateway) {
$gw = $this->main->networkgateway;
} else {
$gw = os_get_network_gateway();
}
$gwn = strtil($gw, '.') . '.0';
$hostname = $this->main->hostname;
if (!$hostname) {
$hostname = os_get_hostname();
}
if ($result['STARTUP_SCRIPT'] != 'systemd') {
$name = createTempDir("{$mountpoint}/tmp", 'xen-scripts');
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/functions", $name);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$ipadd}", $name);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$sethostname}", $name);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$setuserpass}", $name);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$ipdel}", $name);
$basepath = strfrom($name, $mountpoint);
lfile_put_contents("{$name}/tmpfile.sh", "source /{$basepath}/functions\nsource /{$basepath}/{$ipdel}\n");
$delipstring = "IPDELALL=yes chroot {$mountpoint} bash /{$basepath}/tmpfile.sh";
log_shell($delipstring);
log_shell(system($delipstring, $ret1) . ":return {$ret1}");
putenv("VE_STATE=stopped");
lfile_put_contents("{$name}/tmpfile.sh", "source /{$basepath}/functions\n source /{$basepath}/{$ipadd}\n");
$string = "IPDELALL=yes MAIN_NETMASK={$main_netmask} MAIN_IP_ADDRESS={$main_ip} IP_ADDR=\"{$iplist}\" NETWORK_GATEWAY={$gw} NETWORK_GATEWAY_NET={$gwn} chroot {$mountpoint} bash /{$basepath}/tmpfile.sh";
log_shell($string);
log_shell(system($string, $ret1) . ":return {$ret1}");
lfile_put_contents("{$name}/tmpfile.sh", "source /{$basepath}/functions\n source /{$basepath}/{$sethostname}\n");
$string = "HOSTNM={$hostname} chroot {$mountpoint} bash /{$basepath}/tmpfile.sh";
log_shell($string);
log_shell(system($string, $ret1) . ":return {$ret1}");
if ($this->main->subaction === 'rebuild' || $this->main->dbaction === 'add' || $this->main->isOn('__var_rootpassword_changed') && $this->main->rootpassword) {
$rootpass = "root:{$this->main->rootpassword}";
lfile_put_contents("{$name}/tmpfile.sh", "source /{$basepath}/functions\n source /{$basepath}/{$setuserpass}\n");
$string = "USERPW={$rootpass} chroot {$mountpoint} bash /{$basepath}/tmpfile.sh";
log_shell($string);
log_shell(system($string));
}
lxfile_rm_rec($name);
} else {
if ($result['STARTUP_SCRIPT'] == 'systemd') {
$script_dir = createTempDir("{$mountpoint}", "hypervm-runonce");
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/functions", $script_dir);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$ipadd}", $script_dir);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$sethostname}", $script_dir);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$setuserpass}", $script_dir);
lxfile_cp_rec("__path_program_root/bin/xen-dists/scripts/{$ipdel}", $script_dir);
$basepath = strfrom($script_dir, $mountpoint);
$startupdir = 'lib/systemd/system';
$startupscript = 'fedora-startup.service';
$setrootpass = '';
if ($this->main->subaction === 'rebuild' || $this->main->dbaction === 'add' || $this->main->isOn('__var_rootpassword_changed') && $this->main->rootpassword) {
$rootpass = "root:{$this->main->rootpassword}";
$setrootpass = " & USERPW={$rootpass} source {$basepath}/{$setuserpass}";
}
$run_once_script = "#!/bin/bash\n" . "source {$basepath}/functions\n" . '(' . "IPDELALL=yes source {$basepath}/{$ipdel}" . " & IPDELALL=yes VE_STATE=stopped MAIN_NETMASK={$main_netmask} MAIN_IP_ADDRESS={$main_ip} IP_ADDR=\"{$iplist}\" NETWORK_GATEWAY={$gw} NETWORK_GATEWAY_NET={$gwn} source {$basepath}/{$ipadd}" . " & HOSTNM={$hostname} source {$basepath}/{$sethostname}" . "{$setrootpass})\n" . "service fedora-startup disable\nrm -f /{$startupdir}/{$startupscript}\nrm -rf {$basepath}";
//.........这里部分代码省略.........
示例9: delDomain
function delDomain()
{
global $gbl, $sgbl, $login, $ghtml;
// Very important. If the nname is null, then the 'rm -rf' command will delete all the domains.
// So please be carefule here. Must find a better way to delete stuff.
if (!$this->main->nname) {
return;
}
// MR -- don't need updateMainConfFile() for new structure but directly delete domain config file
// $this->updateMainConfFile();
$plist = array('domains', 'redirects', 'wildcards', 'exclusive');
$bpath = "/home/apache/conf";
foreach ($plist as $k => $v) {
lxfile_rm("{$bpath}/{$v}/{$this->main->nname}.conf");
}
$this->main->deleteDir();
self::createSSlConf($this->main->__var_ipssllist, $this->main->__var_domainipaddress);
}
示例10: updatecleanup
function updatecleanup()
{
setPrepareKloxo();
// Fixes #303 and #304
installThirdparty();
install_gd();
install_bogofilter();
setInitialPhpMyAdmin();
setInitialAdminAccount();
setInitialKloxoPhp();
installWebmail();
installAwstats();
setRemoveOldDirs();
setInitialBinary();
log_cleanup("Remove lighttpd errorlog");
log_cleanup("- Remove process");
remove_lighttpd_error_log();
log_cleanup("Fix the secure logfile");
log_cleanup("- Fix process");
call_with_flag("fix_secure_log");
log_cleanup("Clean hosts.deny");
log_cleanup("- Clean process");
call_with_flag("remove_host_deny");
log_cleanup("Turn off mouse daemon");
log_cleanup("- Turn off process");
system("chkconfig gpm off");
if (lxfile_exists("phpinfo.php")) {
log_cleanup("Remove phpinfo.php");
log_cleanup("- Remove process");
lxfile_rm("phpinfo.php");
}
setInitialBind();
log_cleanup("Killing gettraffic system process");
log_cleanup("- Killing process");
lxshell_return("pkill", "-f", "gettraffic");
setCheckPackages();
copy_script();
install_xcache();
log_cleanup("Install Kloxo service");
log_cleanup("- Install process");
lxfile_unix_chmod("/etc/init.d/kloxo", "0755");
system("chkconfig kloxo on");
setJailshellSystem();
log_cleanup("Set /home permission to 0755");
log_cleanup("- Set process");
lxfile_unix_chmod("/home", "0755");
setExecuteCentos5Script();
fix_rhn_sources_file();
setInitialApacheConfig();
setInitialPureftpConfig();
setInstallMailserver();
log_cleanup("Enable xinetd service");
log_cleanup("- Enable process");
call_with_flag("enable_xinetd");
fix_suexec();
if (!lxfile_exists("/usr/bin/php-cgi")) {
log_cleanup("Initialize php-cgi binary");
log_cleanup("- Initialize process");
lxfile_cp("/usr/bin/php", "/usr/bin/php-cgi");
}
setSomePermissions();
setInitialLighttpdConfig();
setInitialNobodyScript();
setSomeScript();
log_cleanup("Install /etc/init.d/djbdns service file");
log_cleanup("- Install process");
lxfile_cp("../file/djbdns.init", "/etc/init.d/djbdns");
removeOtherDrivers();
log_cleanup("Remove cache dir");
log_cleanup("- Remove process");
lxfile_rm_rec("__path_program_root/cache");
log_cleanup("Restart syslog service");
log_cleanup("- Restart process");
createRestartFile('syslog');
log_cleanup("Initialize awstats dirdata");
log_cleanup("- Initialize process");
lxfile_mkdir("/home/kloxo/httpd/awstats/dirdata");
setInitialLogrotate();
installRoundCube();
installHorde();
installChooser();
log_cleanup("Remove old lxlabs ssh key");
log_cleanup("- Remove process");
remove_ssh_self_host_key();
setInitialServer();
setDefaultPages();
installInstallApp();
setFreshClam();
changeMailSoftlimit();
}
示例11: getMetaData
static function getMetaData($file)
{
global $gbl, $sgbl, $login, $ghtml;
$progname = $sgbl->__var_program_name;
if (!lxfile_exists($file)) {
throw new lxException('could_not_find_file', '', $file);
}
$tmpdir = lxbackup::createTmpDirIfitDoesntExist($file, false);
print_time("create_tmp_dir", "Creating Tmp Directory");
$filename = recursively_get_file($tmpdir, "{$progname}.file");
// KLoxo has to recognize lxadmin's backup file.
if (!$filename && $sgbl->isKloxoForRestore()) {
$filename = recursively_get_file($tmpdir, "lxadmin.file");
}
$rem = unserialize(file_get_contents($filename));
$bugfix = $tmpdir . $progname . ".file";
lxfile_rm($bugfix);
$bugfix = $tmpdir . $progname . ".metadata";
lxfile_rm($bugfix);
lxfile_tmp_rm_rec($tmpdir);
lxfile_rm_rec($tmpdir);
if (!$rem) {
throw new lxException('backupfile_corrupted', '');
}
return $rem;
}
示例12: rotateLog
static function rotateLog($processedir, $file)
{
$stat = stat($file);
if ($stat['size'] >= 10 * 1024 * 1024) {
lxfile_mv($file, getNotexistingFile($processedir, basename($file)));
createRestartFile("syslog");
}
$list = lscandir_without_dot($processedir);
foreach ($list as $k) {
$file = "{$processedir}/{$k}";
$stat = stat($file);
if ($stat['mtime'] < time() - 10 * 24 * 3600) {
dprint("deleting old log {$file}\n");
lxfile_rm($file);
}
}
}
示例13: doBeforeUpdate
function doBeforeUpdate()
{
global $gbl, $sgbl, $login, $ghtml;
$program = $sgbl->__var_program_name;
// Check for lxlabs yum repo file and if exists
// Change to lxcenter repo file
if (lxfile_exists("/etc/yum.repos.d/lxlabs.repo")) {
log_cleanup("- Deleting old lxlabs yum repo");
lxfile_mv("/etc/yum.repos.d/lxlabs.repo", "/etc/yum.repos.d/lxlabs.repo.lxsave");
exec("rm -f /etc/yum.repos.d/lxlabs.repo");
log_cleanup("- Removed lxlabs.repo");
log_cleanup("- Installing lxcenter.repo");
exec("wget -O /etc/yum.repos.d/lxcenter.repo http://download.lxcenter.org/lxcenter.repo");
log_cleanup("- Installing yum-protectbase plugin");
exec("yum install -y -q yum-protectbase");
}
// Project issue #1079
// Install yum-plugin-replace (New since Kloxo 6.1.14)
$ret = install_if_package_not_exist("yum-plugin-replace");
if ($ret) {
print "Installed RPM package yum-plugin-replace\n";
}
// Project issue #1079
// Replace lxphp package (New since Kloxo 6.1.14)
$ret = replace_rpm_package("lxphp", "kloxo-core-php");
if ($ret) {
print "Replaced RPM package lxphp with kloxo-core-php\n";
}
// Fix #388 - phpMyAdmin config.inc.php permission
$correct_perm = "0644";
$check_perm = substr(decoct(fileperms("/usr/local/lxlabs/{$program}/httpdocs/thirdparty/phpMyAdmin/config.inc.php")), 2);
if ($check_perm != $correct_perm) {
lxfile_unix_chmod("/usr/local/lxlabs/{$program}/httpdocs/thirdparty/phpMyAdmin/config.inc.php", "0644");
}
// Project issue #1081
// Remove lxrestart
if (lxfile_exists("/usr/sbin/lxrestart")) {
log_cleanup("- Deleting lxrestart from /usr/sbin/ (not in use anymore)");
lxfile_rm('/usr/sbin/lxrestart');
}
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/cexe/lxrestart')) {
log_cleanup("- Deleting lxrestart from cexe (not in use anymore)");
lxfile_rm('/usr/local/lxlabs/' . $program . '/cexe/lxrestart');
}
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/src/lxrestart.c')) {
log_cleanup("- Deleting lxrestart.c from src (not in use anymore)");
lxfile_rm('/usr/local/lxlabs/' . $program . '/src/lxrestart.c');
}
// Clean Source dir
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/src/lxrestart')) {
log_cleanup("- Clean the sources dir - remove lxrestart");
lxfile_rm('/usr/local/lxlabs/' . $program . '/src/lxrestart');
}
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/src/closeallinput')) {
log_cleanup("- Clean the sources dir - remove closeallinput");
lxfile_rm('/usr/local/lxlabs/' . $program . '/src/closeallinput');
}
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/src/lxexec')) {
log_cleanup("- Clean the sources dir - remove lxexec");
lxfile_rm('/usr/local/lxlabs/' . $program . '/src/lxexec');
}
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/src/lxphpsu')) {
log_cleanup("- Clean the sources dir - remove lxphpsu");
lxfile_rm('/usr/local/lxlabs/' . $program . '/src/lxphpsu');
}
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/src/lxsuexec')) {
log_cleanup("- Clean the sources dir - remove lxsuexec");
lxfile_rm('/usr/local/lxlabs/' . $program . '/src/lxsuexec');
}
// DT18022014 - Cleanup the mess.
if (lxfile_exists('/usr/local/lxlabs/' . $program . '/httpdocs/live/common.php')) {
log_cleanup("- Remove live dir (not in use)");
lxfile_rm_rec('/usr/local/lxlabs/' . $program . '/httpdocs/live');
lxfile_rm('/usr/local/lxlabs/' . $program . '/etc/phplive.db');
}
}
示例14: createIniFile
//.........这里部分代码省略.........
//dprintr($this->main->phpini_flag_b);
$this->initString($ver);
//dprintr($this->main->phpini_flag_b);
$header = lfile_get_contents("../file/phpini/php.ini.template-{$ver}");
$cont = lfile_get_contents("../file/phpini/php.ini.temp");
$htcont = lfile_get_contents("../file/phpini/htaccesstemp");
$vlist = array("enable_zend_val", "enable_ioncube_val", "enable_xcache_val");
$l1 = $this->main->getInheritedList();
$l2 = $this->main->getLocalList();
$l3 = $this->main->getExtraList();
$ll = lx_array_merge(array($l1, $l2, $l3));
$list = array_unique($ll);
foreach ($list as $l) {
$vl = strtil($l, "_flag") . "_val";
if (array_search_bool($vl, $vlist)) {
continue;
}
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), $l);
}
foreach ($vlist as $vl) {
list($cont) = $this->replacestr(array($cont), $vl);
}
/*
list($cont) = $this->replacestr(array($cont), 'enable_zend_val');
list($cont) = $this->replacestr(array($cont), 'enable_ioncube_val');
list($cont) = $this->replacestr(array($cont), 'enable_xcache_val');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'register_global_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'output_compression_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'display_error_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'file_uploads_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'upload_max_filesize');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'log_errors_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'upload_tmp_dir_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'output_buffering_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'register_argc_argv_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'magic_quotes_gpc_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'variables_order_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'magic_quotes_runtime_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'magic_quotes_sybase_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'gpc_order_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'extension_dir_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'enable_dl_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'mysql_allow_persistent_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'disable_functions_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'max_execution_time_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'max_input_time_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'memory_limit_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'post_max_size_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'register_long_arrays_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'allow_url_fopen_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'allow_url_include_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'session_save_path_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'cgi_force_redirect_flag');
list($cont, $htcont) = $this->replacestr(array($cont, $htcont), 'safe_mode_flag');
*/
$stlist[] = "###Start Kloxo PHP config Area";
$stlist[] = "###Start Lxdmin Area";
$stlist[] = "###Start Kloxo Area";
$stlist[] = "###Start Lxadmin PHP config Area";
$endlist[] = "###End Kloxo PHP config Area";
$endlist[] = "###End Kloxo Area";
$endlist[] = "###End Lxadmin PHP config Area";
$endstring = $endlist[0];
$startstring = $stlist[0];
if ($pclass === 'pserver') {
$file = "/etc/php.ini";
if (!lxfile_exists("__path_kloxo_back_phpini")) {
lxfile_cp("/etc/php.ini", "__path_kloxo_back_phpini");
}
$this->enableDisableModule("enable_xcache_flag", "xcache");
$htfile = null;
$extrafile = "/etc/custom.php.ini";
$extrastring = lfile_get_contents("/etc/custom.php.ini");
$cont = "{$extrastring}\n{$cont}";
} else {
$dname = $this->main->getParentName();
$elogfile = "/home/{$this->main->__var_customer_name}/__processed_stats/{$this->main->getParentName()}.phplog";
$file = "__path_httpd_root/{$this->main->getParentName()}/php.ini";
$extrafile = "__path_httpd_root/{$this->main->getParentName()}/custom.php.ini";
$extrastring = lfile_get_contents($extrafile);
$htfile = "{$this->main->__var_docrootpath}/.htaccess";
$ht1file = "/home/httpd/{$this->main->getParentName()}/kloxoscript/.htaccess";
$htcont = "php_value error_log {$elogfile}\n{$htcont}";
$htcont = "<Ifmodule mod_php4.c>\n{$htcont}\n</Ifmodule>\n<Ifmodule mod_php5.c>\n{$htcont}\n</Ifmodule>\n";
file_put_between_comments($stlist, $endlist, $startstring, $endstring, $htfile, $htcont);
file_put_between_comments($stlist, $endlist, $startstring, $endstring, $ht1file, $htcont);
lxfile_unix_chown($htfile, "{$this->main->__var_web_user}:apache");
$adminbasedir = trim($this->main->__var_extrabasedir);
if (!$this->main->isOn('__var_disable_openbasedir')) {
$cont = "open_basedir = /home/{$this->main->__var_customer_name}:{$adminbasedir}:/tmp:/usr/share/pear:/home/httpd/{$dname}:/var/lib/php/session:/home/kloxo/httpd/script:/home/httpd/{$dname}/kloxoscript/\n{$cont}";
}
$cont = "error_log = {$elogfile}\n{$cont}";
$cont = "{$extrastring}\n{$cont}";
}
lxfile_rm($file);
lfile_put_contents($file, "{$header}\n{$cont}\n");
createRestartFile($this->main->__var_webdriver);
}
示例15: lxfile_rm_content
function lxfile_rm_content($dir)
{
$username = "__system__";
$dir = expand_real_root($dir);
$list = lscandir_without_dot($dir);
foreach ($list as $l) {
lxfile_rm("{$dir}/{$l}");
}
}